{"cve":"CVE-2024-56140","nvd":{"published":"2024-12-18T21:15:08.353","modified":"2026-06-17T08:11:45.220","status":"Analyzed","description":"Astro is a web framework for content-driven websites. In affected versions a bug in Astro’s CSRF-protection middleware allows requests to bypass CSRF checks. When the `security.checkOrigin` configuration option is set to `true`, Astro middleware will perform a CSRF check. However, a vulnerability exists that can bypass this security. A semicolon-delimited parameter is allowed after the type in `Content-Type`. Web browsers will treat a `Content-Type` such as `application/x-www-form-urlencoded; abc` as a `simple request` and will not perform preflight validation. In this case, CSRF is not blocked as expected. Additionally, the `Content-Type` header is not required for a request. This issue has been addressed in version 4.16.17 and all users are advised to upgrade. There are no known workarounds for this vulnerability.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5},"cwes":["CWE-352"],"references":["https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests","https://github.com/withastro/astro/blob/6031962ab5f56457de986eb82bd24807e926ba1b/packages/astro/src/core/app/middlewares.ts","https://github.com/withastro/astro/commit/e7d14c374b9d45e27089994a4eb72186d05514de","https://github.com/withastro/astro/security/advisories/GHSA-c4pw-33h3-35xw"],"products":["astro:astro"],"source":"nvd","synced_at":"2026-10-19T21:57:56.913276502+00:00"},"epss":{"cve":"CVE-2024-56140","score":0.00223,"percentile":0.12932,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-c4pw-33h3-35xw","url":"https://osv.dev/vulnerability/GHSA-c4pw-33h3-35xw","summary":"Atro CSRF Middleware Bypass (security.checkOrigin)","modified":"2025-11-27T08:18:05.038082Z","packages":[{"ecosystem":"npm","name":"astro","purl":"pkg:npm/astro","ranges":["<4.16.17"],"fixed":["4.16.17"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}