Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

hwdsl2/docker-ipsec-vpn-server
master @ 2bcb4a1
2
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Injection: 1 prior fix. Scrutinize any change in this area.
run.sh: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Remote Code Execution: Multi-line responses from external APIs (such as swan_ver_latest) could inject arbitrary shell commands or bypass version validation checks when processed through command pipelines like sort or eval. This was mitigated by truncating the response to the first line.
Injection: User-supplied VPN credentials (username/password) were written directly into system configuration files (/etc/ppp/chap-secrets and /etc/ipsec.d/passwd) without escaping, allowing syntax corruption or configuration injection via special characters like quotes and backslashes.