Security context

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

MHSanaei/3x-ui
main @ 49773c1
57
Fixes
1
CVEs
CRITICAL
Peak severity
35.3%
Coverage
Highlights
Denial of Service: 12 prior fixes. Scrutinize any change in this area.
web/middleware/domainValidator.go: most-fixed (3 issues). Treat as high-risk during review.
25 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.

Auth Bypass: Administrative settings and credential-reset endpoints previously allowed disabling 2FA or modifying user profiles without validating current 2FA status or authenticating the active session correctly. This is critical as it completely subverts administrative panel protection.
SSRF: Outbound requests, remote node checks, and custom geofile download handlers were vulnerable to SSRF and DNS-rebinding attacks when attempting to dial or request user-provided URLs without validating target ranges against private IP blocks.
Path Traversal: File download and write operations constructed paths directly from user input without canonicalization or validation against strict allowlists, enabling arbitrary file reads/writes outside of the designated environment directory.