Skip to content

astro

Bypass of CSRF Middleware in Astro

CVE-2024-56140Published 18 Dec 2024, 20:41 UTC

Real-world risk

2.1/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.9

scored by the vendor (CNA), CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from GitHub_M)

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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
astroCommon< 4.16.174.16.17

What to do

Update to a fixed version: 4.16.17.

Why this score

FactorValueEvidence×
ImpactMajor data tamperingWrites or changes important data without gaining executionFrom the CVSS vector0.70
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T3: Public proof of concept (× 0.95)

A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit

  • CISA SSVC: proof of concept

EPSS 0.2% chance of exploitation in 30 days (percentile 16), as of 2026-12-05.

The arithmetic
  1. Prerequisites multiplied together0.315
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 0.7 × prerequisites 0.315 × threat 0.952.095
  4. Rounded to one decimal between 0.1 and 102.1

How the score works

Exploitation and evidence timeline

  1. 18 Dec 2024 Published
  2. 3 Dec 2026 CISA SSVC: proof of concept first seen
  3. 3 Dec 2026 Risk 2.1 (cvss fallback)

Weakness

CWE-352

References

Get alerts for astro

Free email or text alerts when a vulnerability in astro reaches risk 8 or higher. Nothing else.