CVE-2024-41657: Casdoor CORS misconfiguration (GHSL-2024-035)
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.50665%
CWE
Published
8/22/2024
Updated
8/22/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/casdoor/casdoor | go | <= 1.557.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the CorsFilter function's origin validation logic in cors_filter.go. The code checks if the Origin header starts with insecure prefixes like 'http://localhost' using strings.HasPrefix, which fails to validate full domain matches. This allows malicious subdomains to bypass CORS restrictions. The GitHub advisory specifically references line 45 in this file as the vulnerable location, and the described attack scenario directly maps to the observed prefix-based validation pattern in the code.