CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-HP3V-MFQW-H74C

GHSA-hp3v-mfqw-h74c: Missing Character Escaping in @astrojs/netlify Remote Image Pattern Configuration

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 21, 2026·6 min read·10 visits

Executive Summary (TL;DR)

The @astrojs/netlify adapter fails to escape dots and other regular expression metacharacters in developer-defined image pathnames, generating insecure edge configurations that permit attackers to bypass path-level restrictions on Netlify's Image CDN.

A security vulnerability in @astrojs/netlify allows attackers to bypass remote image path restrictions by leveraging unescaped regular expression metacharacters. The integration adapter fails to sanitize developer-defined pathnames before interpolating them into a configuration JSON file consumed by Netlify's Edge Image CDN. This results in overly permissive matching behavior at the edge routing layer, enabling path-traversal and filter bypasses.

Vulnerability Overview

The @astrojs/netlify adapter is an integration for the Astro framework that enables building and deploying server-side rendered (SSR) applications directly onto Netlify. During the build phase, the adapter translates developer-defined remote image patterns (image.remotePatterns from astro.config.mjs) into a deployment configuration file located at .netlify/v1/config.json under the images.remote_images property.

This configuration acts as a whitelist of remote hosts and pathnames authorized to utilize Netlify's Edge Image Content Delivery Network (CDN) for caching and optimization. A vulnerability exists within versions of @astrojs/netlify prior to 8.1.2 where the adapter fails to escape regular expression metacharacters within literal pathnames during configuration translation.

The generated configurations are evaluated directly by Netlify's Image CDN at the edge. The absence of proper escaping results in an overly permissive matching pattern, enabling path-level authorization bypasses and allowing unauthorized image resources to be processed and cached.

Root Cause Analysis

The root cause of the vulnerability lies within the remotePatternToRegex() function inside the packages/integrations/netlify/src/index.ts file. When processing the configured pathnames, the logic attempts to construct regular expressions for exact matches or wildcard segments (such as /** or /*).

However, the implementation interpolates raw string variables from the developer configuration straight into the regular expression template without sanitizing special characters. Specifically, regular expression metacharacters like the dot (.) are interpreted by Netlify's edge routing engine as wildcards representing any character except a newline.

Since literal directory pathnames often contain dots (such as API version folders /v1.0/ or specific static files), this omission allows a dot to match alternative arbitrary characters (CWE-116, CWE-185). Additionally, there are no compensating runtime validation checks in place during edge CDN execution. Although Astro implements a strict exact-match verification utility named matchPattern() during standard SSR requests, this layer is completely bypassed when requests are served directly by Netlify's Edge Image CDN.

Code Analysis

In vulnerable versions of @astrojs/netlify (prior to 8.1.2), the remotePatternToRegex translation block does not sanitize the input pathname before executing interpolation. The following code block demonstrates the vulnerable implementation:

if (pathname) {
    if (pathname.endsWith('/**')) {
        // Match any path.
        regexStr += `(\\${pathname.replace('/**', '')}.*)`;
    }
    if (pathname.endsWith('/*')) {
        // Match one level of path
        regexStr += `(\\${pathname.replace('/*', '')}\\/[^/?#]+)\\/?`;
    } else {
        // Exact match
        regexStr += `(\\${pathname})`;
    }
}

The patched version introduces an explicit escapeRegex utility function. This utility replaces all standard regex metacharacters, such as dots, asterisks, brackets, and parentheses, with their escaped counterparts before injecting them into the compiled regex. The fixed implementation is shown below:

/**
 * Escape regex metacharacters in a literal string so it matches verbatim.
 */
function escapeRegex(literal: string): string {
	return literal.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
 
// ... inside remotePatternToRegex() ...
if (pathname) {
    if (pathname.endsWith('/**')) {
        // Match any path. Escape the literal prefix so metacharacters
        // (e.g. `.`) match verbatim instead of acting as wildcards.
        regexStr += `(${escapeRegex(pathname.replace('/**', ''))}.*)`;
    } else if (pathname.endsWith('/*')) {
        // Match one level of path
        regexStr += `(${escapeRegex(pathname.replace('/*', ''))}\\/[^/?#]+)\\/?`;
    } else {
        // Exact match
        regexStr += `(${escapeRegex(pathname)})`;
    }
}

The fix is complete and robust because it maps all key special characters to safe literal representations. It preserves Astro's specific wildcard syntax (/** and /*) by parsing them first, and escaping only the static portion of the user-provided path. This prevents any secondary variant exploits against the path resolution mechanism.

Exploitation Methodology & Proof of Concept

Exploitation of this vulnerability requires a target application to deploy @astrojs/netlify with a remote image configuration containing dot characters in its pathname. Consider an astro.config.mjs setup whitelisting a specific versioned resource path:

// astro.config.mjs
image: {
  remotePatterns: [{
    protocol: 'https',
    hostname: 'cdn.example.com',
    pathname: '/img/v1.0/file',
  }],
}

When processed by a vulnerable adapter, this translates to the pattern https://cdn\\.example\\.com(:[0-9]+)?(\\/img/v1.0/file)([?][^#]*)?$ in .netlify/v1/config.json. Because the dot in v1.0 remains unescaped, an attacker can construct malicious requests to match alternative paths. For instance, the URL https://cdn.example.com/img/v1A0/file will be successfully matched as the dot evaluates 'A' as valid.

More critically, the unescaped dot matches a forward slash (/), allowing path traversal and directory crossing. An attacker requesting https://cdn.example.com/img/v1/0/file bypasses the intended directory restriction. This lets attackers load and optimize assets from unauthorized directories on the allowed host, manipulating the Edge Image CDN directly.

Impact Assessment

The security impact is classified as Low with a CVSS score of 3.7. The primary consequence is unauthorized resource consumption and filter bypass. Attackers can leverage the flawed regex to force Netlify's Edge Image CDN to retrieve, optimize, and cache arbitrary images from non-permitted paths on the target hostname.

While this does not lead directly to Remote Code Execution (RCE) or sensitive database disclosure, it enables attackers to hijack Netlify cloud resources (Resource Hijacking, MITRE ATT&CK T1496). This can lead to increased CDN operational bandwidth, unexpected serverless usage costs, and potential cache poisoning if malicious payloads are served via the optimized paths.

The vulnerability is not listed in the CISA KEV catalog, and there is no known active exploitation in the wild. Exploitation complexity is high because it requires specific target configurations containing metacharacter-adjacent structures on the whitelisted servers.

Remediation & Detection Guidance

To remediate this vulnerability, developers must upgrade the @astrojs/netlify dependency to version 8.1.2 or higher. This updates the underlying configuration compiler to include the safe regex escaping mechanism.

Deployments can be verified by executing a local build via npm run build and auditing the output of .netlify/v1/config.json. Check the images.remote_images field to confirm that all dot characters in configured paths are escaped as \.. For example, a secure output should resemble (\\/img/v1\\.0\\/file) instead of (\\/img/v1.0/file).

If immediate dependency updates are not possible, developers should temporarily remove any regex metacharacters (including dots) from the pathname configurations in astro.config.mjs. Replacing file extensions or version strings with generic directory paths can mitigate direct path traversal risks.

Official Patches

AstroFix PR implementing safe regex escaping helper inside the Netlify adapter.

Technical Appendix

CVSS Score
3.7/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected Systems

Astro applications deployed on Netlify using @astrojs/netlify < 8.1.2

Affected Versions Detail

Product
Affected Versions
Fixed Version
@astrojs/netlify
Astro
< 8.1.28.1.2
AttributeDetail
CWE IDCWE-185: Incorrect Regular Expression / CWE-116: Improper Output Escaping
Attack VectorNetwork
CVSS v3.1 Score3.7 (Low)
EPSS ScoreNot Available
ImpactFilter Bypass / Resource Hijacking
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1564Hide Artifacts
Defense Evasion
T1496Resource Hijacking
Impact
CWE-185
Incorrect Regular Expression

The software does not properly escape metacharacters before incorporating user input into a regular expression, enabling unexpected matching behavior.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory text containing configuration details and technical explanation of the bypass mechanics.

Vulnerability Timeline

Vulnerability validated and official patch merged into repository
2026-07-20
Release of @astrojs/netlify version 8.1.2 on npm
2026-07-20
Advisory GHSA-hp3v-mfqw-h74c published
2026-07-20

References & Sources

  • [1]GitHub Security Advisory GHSA-hp3v-mfqw-h74c
  • [2]Related Vulnerability GHSA-529g-xq4f-cw38 (CVE-2026-54300)
  • [3]Astro Pull Request #17018
  • [4]Main Astro Repository
Related Vulnerabilities
CVE-2026-54300

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•25 minutes ago•GHSA-8RW6-P7M8-63JP
6.5

GHSA-8RW6-P7M8-63JP: Array Element-Level SELECT Permissions Leak in SurrealDB

SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.

Alon Barad
Alon Barad
0 views•6 min read
•about 22 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 23 hours ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
10 views•5 min read
•1 day ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
15 views•6 min read
•1 day ago•CVE-2026-54249
6.8

CVE-2026-54249: Server-Side Request Forgery via Confused Deputy in Pydantic AI UI Adapters

A Server-Side Request Forgery (SSRF) / Confused Deputy vulnerability has been identified in Pydantic AI UI Adapters (such as VercelAIAdapter). Under certain conditions, a malicious client can supply manipulated message history with provider metadata that forces the server to resolve files within privileged cloud environments (AWS S3, Google Cloud Storage) or model providers. This occurs because the adapters deserialize client-provided metadata structures directly into UploadedFile instances without validation, which are subsequently fetched using high-privilege server credentials.

Alon Barad
Alon Barad
7 views•7 min read