Read the docs
TI-2024-37133 Aliases CVE-2024-56140GHSA-c4pw-33h3-35xw

Bypass of CSRF Middleware in Astro

Priority MEDIUM 62CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Tampering
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-352.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00223 12th percentileScored 2026-11-07
Fix Fixed astro (withastro): 4.16.17astro (npm): 4.16.17

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
withastroastrobefore 4.16.174.16.17Patch availableCNA
—astro (npm)before 4.16.174.16.17Patch availableGHSA-c4pw-33h3-35xw
  • astro Vendorwithastro Affected before 4.16.17 Fixed in 4.16.17 Patch available CNA
  • astro (npm) Vendor— Affected before 4.16.17 Fixed in 4.16.17 Patch available GHSA-c4pw-33h3-35xw

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*before 4.16.17Vulnerablewithastro
  • cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:* Versions before 4.16.17 Vulnerable ·withastro

Remediation

  • Fix · CNA astro (withastro) Fixed in 4.16.17
  • Fix · GHSA-c4pw-33h3-35xw astro (npm) Fixed in 4.16.17 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-56140
  2. 2026-10-03 Alias added: GHSA-c4pw-33h3-35xw

References

  • TI-2024-37142 Server source code is exposed to the public if sourcemaps are enabled CVSS 4.0HIGH 7.8
  • TI-2025-34958 Unauthorized third-party images in Astro’s _image endpoint CVSS 4.0MEDIUM 6.9
  • TI-2025-39915 Server-side request forgery in withastro astro CVSS 3.1MEDIUM 6.5
  • TI-2025-38274 Astro's `X-Forwarded-Host` is reflected with no validation CVSS 3.1MEDIUM 6.5
  • TI-2026-36915 Astro: Reflected XSS via unescaped slot name CVSS 3.1HIGH 7.1
  • TI-2025-40102 Astro is vulnerable to Reflected XSS via the server islands feature CVSS 3.1HIGH 7.1
See all 19 →

Sources