CVE-2024-56140
CVE-2024-56140 is a medium-severity vulnerability in Astro with a CVSS 3.x base score of 5.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-352.
Key facts
- Severity: Medium (CVSS 3.x base score 5.9)
- EPSS exploit prediction: 0% (12th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-3575
- Weakness: CWE-352
- Affected product: Astro
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2024-56140?
- 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.
- How severe is CVE-2024-56140?
- CVE-2024-56140 has a CVSS 3.x base score of 5.9, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity high, and availability none.
- Is CVE-2024-56140 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (12th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2024-56140?
- CVE-2024-56140 affects Astro. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2024-56140?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2024-56140 have an EU (EUVD) identifier?
- Yes. CVE-2024-56140 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-3575.
- When was CVE-2024-56140 published?
- CVE-2024-56140 was published on 2024-12-18 and last updated on 2026-06-17.
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
Affected products (1)
- cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*
More vulnerabilities in Astro
- CVE-2026-54299 — High (CVSS 7.5): Astro is a web framework. Prior to 6.4.6, Astro SSR apps with prerendered error pages (/404 or /500 using export const…
- CVE-2025-59837 — High (CVSS 7.2): Astro is a web framework that includes an image proxy. In versions 5.13.4 and later before 5.13.10, the image proxy…
- CVE-2026-50146 — High (CVSS 7.1): Astro is a web framework. Prior to 6.3.3, when a component uses a client:* directive, Astro inserts named slot content…
- CVE-2025-64764 — High (CVSS 7.1): Astro is a web framework. Prior to version 5.15.8, a reflected XSS vulnerability is present when the server islands…
- CVE-2025-66202 — Medium (CVSS 6.5): Astro is a web framework. Versions 5.15.7 and below have a double URL encoding bypass which allows any unauthenticated…
- CVE-2025-64525 — Medium (CVSS 6.5): Astro is a web framework. In Astro versions 2.16.0 up to but excluding 5.15.5 which utilizeon-demand rendering, request…
Other CWE-352 (Cross-Site Request Forgery (CSRF)) vulnerabilities
- CVE-2025-32642 — Critical (CVSS 10.0): Cross-Site Request Forgery (CSRF) vulnerability in appsbd Vite Coupon vite-coupon allows Remote Code Inclusion.This…
- CVE-2025-23922 — Critical (CVSS 10.0): Cross-Site Request Forgery (CSRF) vulnerability in Harsh iSpring Embedder embed-ispring allows Upload a Web Shell to a…
- CVE-2017-5145 — Critical (CVSS 10.0): An issue was discovered in Carlo Gavazzi VMU-C EM prior to firmware Version A11_U05, and VMU-C PV prior to firmware…
- CVE-2019-25729 — Critical (CVSS 9.8): PDF Signer 3.0 contains a server-side template injection vulnerability that allows unauthenticated attackers to execute…
- CVE-2025-48340 — Critical (CVSS 9.8): Cross-Site Request Forgery (CSRF) vulnerability in Danny Vink User Profile Meta Manager user-profile-meta allows…
- CVE-2025-2907 — Critical (CVSS 9.8): The Order Delivery Date WordPress plugin before 12.3.1 does not have authorization and CSRF checks when importing…
Browse all CWE-352 (Cross-Site Request Forgery (CSRF)) vulnerabilities →