Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @astrojs/netlify
  4. ›
  5. GHSA-hp3v-mfqw-h74c

GHSA-hp3v-mfqw-h74c: @astrojs/netlify generates an overly-broad Netlify Image CDN allowlist because remotePatterns.pathname metacharacters are not escaped

July 20, 2026

The @astrojs/netlify adapter converts each image.remotePatterns entry into a regular expression that is written to .netlify/v1/config.json under images.remote_images. Netlify’s Image CDN uses these regexes as the allowlist that decides which remote image URLs it will optimize. remotePatternToRegex() escapes . in the hostname but interpolates the literal pathname into the regex without escaping regex metacharacters. As a result, the generated allowlist is broader than the pattern the developer declared, and broader than Astro’s canonical matchPattern() helper (which compares non-wildcard pathnames by exact string equality).

This is a residual of the same bug class addressed in CVE-2026-54300 (PR #17018, commit 1310277d). That fix corrected wildcard semantics and added a $ anchor but did not add metacharacter escaping for literal pathnames.

References

  • github.com/advisories/GHSA-529g-xq4f-cw38
  • github.com/advisories/GHSA-hp3v-mfqw-h74c
  • github.com/withastro/astro/pull/17018
  • github.com/withastro/astro/security/advisories/GHSA-hp3v-mfqw-h74c

Code Behaviors & Features

Detect and mitigate GHSA-hp3v-mfqw-h74c with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.1.2

Fixed versions

  • 8.1.2

Solution

Upgrade to version 8.1.2 or above.

Impact 3.7 LOW

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

Learn more about CVSS

Weakness

  • CWE-185: Incorrect Regular Expression

Source file

npm/@astrojs/netlify/GHSA-hp3v-mfqw-h74c.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:43 +0000.