Litestar
Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.20.0, CORSConfig.allowed_origins_regex is constructed using a regex built from configured allowlist values and used with fullmatch() for validation. Because metacharacters are not escaped, a malicious origin can match unexpectedly. The check relies on allowed_origins_regex.fullmatch(origin). This vulnerability is fixed in 2.20.0.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.4high · scored by CNA · CWE-942
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
litestar-org litestar
- < 2.20.0
Fixed in 2.20.0
Mitigation
Upgrade litestar to 2.20.0 or later.
References
- Vendor advisory github.com/litestar-org/litestar/security/advi…
- Patch github.com/litestar-org/litestar/commit/eb8770…
- Release notes docs.litestar.dev/2/release-notes/changelog.html
1 more
- Release notes github.com/litestar-org/litestar/releases/tag/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.