CVE-2023-37265: CasaOS Gateway vulnerable to incorrect identification of source IP addresses
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.99671%
CWE
Published
7/17/2023
Updated
12/12/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/IceWhaleTech/CasaOS-Gateway | go | < 0.4.4 | 0.4.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper IP validation in the request handling flow. The pre-patch code in gateway_route.go's GetRoute handler forwarded requests without sanitizing X-Forwarded-For headers. This allowed attackers to manipulate their perceived IP address to bypass authentication middleware (like ExceptLocalhost) that skipped JWT validation for localhost requests. The critical missing element was the rewriteRequestSourceIP() function added in the patch, which properly sanitizes headers and validates the remote IP before trusting X-Forwarded-For values. The anonymous handler function in GetRoute is identified as the vulnerable entry point because it directly handled incoming requests without these protections.