CVE-2026-33769: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-33769 is a remote allowlist bypass vulnerability in the Astro web framework caused by an unanchored matchPathname wildcard in the remotePatterns path enforcement logic. It affects Astro versions from 2.10.10 up to (but not including) 5.18.1 for Node.js. An unauthenticated remote attacker can craft URLs that bypass configured path prefix restrictions on allowlisted hosts, enabling unauthorized fetching of remote resources via server-side endpoints such as the image optimization endpoint. It was published on March 24, 2026, with a CVSS v3.1 score of 5.3 (Medium) and a CVSS v4.0 score of 2.9 (Low) (GitHub Advisory).

Technical details

The root cause is improper input validation (CWE-20) combined with a permissive allowlist implementation (CWE-183) in the matchPathname() function within packages/internal-helpers/src/remote.ts. When a remotePattern pathname ends with /* (e.g., /img/*), the function uses JavaScript's .replace() to strip the prefix before counting path segments — but .replace() is not anchored to the start of the string. As a result, a URL path like /evil/img/secret incorrectly matches the pattern /img/* because /img/ is found and removed from the middle of the path, leaving only one segment (secret), which satisfies the single-chunk check. The taint flow is: user-controlled href parameter → transform.src → isRemoteAllowed() → matchPattern() → matchPathname(), ultimately causing the /_image endpoint to fetch and return the unauthorized remote resource (GitHub Advisory).

Impact

Successful exploitation allows an unauthenticated attacker to retrieve files and data from paths outside the intended allowlisted prefix on an otherwise permitted host, constituting a file/data disclosure and partial SSRF expansion. The confidentiality impact is limited to resources accessible on allowlisted hosts beyond the configured path prefix; integrity and availability are not affected. While the scope is constrained to the vulnerable system and does not enable lateral movement or code execution, it could expose sensitive files or internal resources served by allowlisted hosts if those hosts serve content beyond the intended path (GitHub Advisory).

Exploitability

A proof-of-concept (PoC) exploit consisting of two complete Python scripts — a client and a mock attacker server — is publicly available in the GitHub Security Advisory (GitHub Advisory). The vulnerability requires no authentication, no user interaction, and is exploitable over the network, though attack requirements are rated as "Present" (AT:P) under CVSS v4.0, reflecting the need for a specific remotePatterns configuration to be in place. The EPSS score is approximately 0.085% (11th percentile), and there is no evidence of active in-the-wild exploitation or CISA KEV catalog inclusion as of the time of reporting (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify a publicly accessible Astro server-side application (versions 2.10.10–5.18.0) that uses the image optimization endpoint (/_image) with remotePatterns configured to restrict access to specific path prefixes (e.g., pathname: '/img/*').
  2. Identify allowlisted host and path prefix: Determine the allowed hostname and path prefix from the application's behavior or configuration leaks (e.g., by observing which image URLs the application serves successfully).
  3. Craft bypass URL: Construct a URL for an unintended path on the allowlisted host by embedding the allowed prefix later in the path. For example, if /img/* is allowed on cdn.example, craft a URL like https://cdn.example/evil/img/secret.svg.
  4. Send request to image endpoint: URL-encode the crafted target URL and send a GET request to the Astro image optimization endpoint: GET /_image?href=https%3A%2F%2Fcdn.example%2Fevil%2Fimg%2Fsecret.svg&f=svg.
  5. Observe bypass: The matchPathname() function incorrectly matches the path because .replace('/img/', '') removes the prefix from the middle of the path, leaving one segment and passing the check. The server fetches and returns the content of the unintended path with HTTP 200.
  6. Exfiltrate data: Repeat with different paths on the allowlisted host to enumerate and retrieve sensitive resources beyond the intended prefix (GitHub Advisory).

Indicators of compromise

  • Network: Unusual GET requests to the /_image endpoint with href parameters pointing to paths that do not start with the configured allowlisted prefix (e.g., /evil/img/secret.svg when only /img/* is allowed); outbound HTTP/HTTPS requests from the Astro server to allowlisted hosts for unexpected resource paths.
  • Logs: Web server access logs showing repeated /_image requests with URL-encoded href values containing path segments before the allowlisted prefix (e.g., %2Fevil%2Fimg%2F); HTTP 200 responses for /_image requests that should have returned 403 based on configured remotePatterns.
  • Application Behavior: Successful retrieval of resources from paths outside the configured remotePatterns pathname prefix on allowlisted hosts, observable via response content matching resources not intended to be publicly served (GitHub Advisory).

Mitigation and workarounds

Upgrade Astro to version 5.18.1 or later, which patches the matchPathname() function to anchor the prefix replacement to the start of the path string, preventing the bypass (GitHub Advisory). As a temporary workaround prior to patching, review and tighten remotePatterns configuration to use /** (double-star) patterns where possible, and consider implementing additional server-side URL validation before passing URLs to the image endpoint. Restricting network-level access to the /_image endpoint to trusted clients can also reduce exposure until the patch is applied.

Community reactions

The vulnerability was reported by security researcher christos-eth and published by Astro maintainer matthewp on March 24, 2026, via the GitHub Security Advisory program (GitHub Advisory). No significant broader media coverage or notable social media discussion has been identified beyond standard CVE tracking and advisory aggregation sites.

Additional resources

  • GitHub Advisory — Official Astro security advisory (GHSA-g735-7g2w-hh3f)
  • Github Advisory — GitHub Advisory Database entry with CVSS details and PoC
  • ENISA EUVD — ENISA European Vulnerability Database entry (EUVD-2026-14984)
  • GitLab Advisory — GitLab advisory for npm astro package
  • VulDB Entry — VulDB vulnerability database entry

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-w2vw-w76x-qr89HIGH8.5
  • JavaScript logoJavaScript
  • nx
NoYesOct 05, 2026
CVE-2026-104852HIGH8.2
  • JavaScript logoJavaScript
  • @graphql-tools/utils
NoYesOct 05, 2026
GHSA-g7fw-3gjp-g5hfMEDIUM6.5
  • JavaScript logoJavaScript
  • @openclaw/matrix
NoYesOct 05, 2026
GHSA-r4xh-jqrq-34v2MEDIUM5.3
  • JavaScript logoJavaScript
  • smol-toml
NoYesOct 05, 2026
GHSA-6688-9rhm-gjv2LOWN/A
  • JavaScript logoJavaScript
  • dompurify
NoYesOct 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management