Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-56159

HIGH 7.8EPSS 79%

Server source code is exposed to the public if sourcemaps are enabled

Also known as GHSA-49w6-73cw-chjr

Mitigation

  • Upgrade astro to one of 5.0.8, 4.16.18 (or later in the same release line).

Who should check

  • Projects that depend on npm package astro (>= 5.0.0-alpha.0, < 5.0.8)
  • Anyone running withastro astro >= 5.0.0, < 5.0.8; < 4.16.18

Vulnerability facts

Affected
astro >= 5.0.0-alpha.0, < 5.0.8
Fixed in
5.0.8, 4.16.18
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
7.8 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:L/SA:LOpen in CVSS calculator
Show all 11 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: None
  • Privileges required: None
  • User interaction: None
  • Confidentiality impact: Low
  • Integrity impact: None
  • Availability impact: None
  • Confidentiality impact on other systems: High
  • Integrity impact on other systems: Low
  • Availability impact on other systems: Low
EPSS
1.80% chance of exploitation in 30 days (percentile 79, 2026-11-26)
CWE
CWE-219
Published
Modified

Description

Astro is a web framework for content-driven websites. A bug in the build process allows any unauthenticated user to read parts of the server source code. During build, along with client assets such as css and font files, the sourcemap files **for the server code** are moved to a publicly-accessible folder. Any outside party can read them with an unauthorized HTTP GET request to the same server hosting the rest of the website. While some server files are hashed, making their access obscure, the files corresponding to the file system router (those in `src/pages`) are predictably named. For example. the sourcemap file for `src/pages/index.astro` gets named `dist/client/pages/index.astro.mjs.map`. This vulnerability is the root cause of issue #12703, which links to a simple stackblitz project demonstrating the vulnerability. Upon build, notice the contents of the `dist/client` (referred to as `config.build.client` in astro code) folder. All astro servers make the folder in question accessible to the public internet without any authentication. It contains `.map` files corresponding to the code that runs on the server. All **server-output** projects on Astro 5 versions **v5.0.3** through **v5.0.7**, that have **sourcemaps enabled**, either directly or through an add-on such as `sentry`, are affected. The fix for **server-output** projects was released in **astro@5.0.8**. Additionally, all **static-output** projects built using Astro 4 versions **4.16.17 or older**, or Astro 5 versions **5.0.8 or older**, that have **sourcemaps enabled** are also affected. The fix for **static-output** projects was released in **astro@5.0.9**, and backported to Astro v4 in **astro@4.16.18**. The immediate impact is limited to source code. Any secrets or environment variables are not exposed unless they are present verbatim in the source code. There is no immediate loss of integrity within the the vulnerable server. However, it is possible to subsequently discover another vulnerability via the revealed source code . There is no immediate impact to availability of the vulnerable server. However, the presence of an unsafe regular expression, for example, can quickly be exploited to subsequently compromise the availability. The fix for **server-output** projects was released in **astro@5.0.8**, and the fix for **static-output** projects was released in **astro@5.0.9** and backported to Astro v4 in **astro@4.16.18**. Users are advised to update immediately if they are using sourcemaps or an integration that enables sourcemaps.

Affected and fixed versions

Package / productAffectedFixedSource
npm astro>= 5.0.0-alpha.0, < 5.0.85.0.8, 4.16.18osv
withastro astro>= 5.0.0, < 5.0.8; < 4.16.18—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-56159. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-56159.md
Affected: astro >= 5.0.0-alpha.0, < 5.0.8
Fixed in: 5.0.8, 4.16.18

Steps:
1. Search this machine and project for astro (npm), withastro astro: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-56159 being exploited?

There is no confirmed exploitation: CVE-2024-56159 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.80% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-56159?

High: CVSS 7.8 (v4.0, scored by CNA). Remote, no login needed.

Which versions are affected by CVE-2024-56159?

astro >= 5.0.0-alpha.0, < 5.0.8.

Is there a fix for CVE-2024-56159?

Yes. Fixed in 5.0.8, 4.16.18. Upgrade astro to one of 5.0.8, 4.16.18 (or later in the same release line).

How do I check if I'm affected by CVE-2024-56159?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors