Skip to content

fix(deps): pin sharp to patched 0.35.4, document the astro AVIF advisory - #29

Merged
acamarata merged 1 commit into
mainfrom
fix/deps-audit-2026-09-09
Sep 9, 2026
Merged

acamarata merged 1 commit into
mainfrom
fix/deps-audit-2026-09-09

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Closes the scheduled audit failure on 0d19c1d7 (run 34343556095) — one CRITICAL finding, GHSA-26w7-cxv4-gfx2, "Astro: remote code execution through AVIF image optimization".

The advisory names astro, but the bug is in sharp

It ranges on astro >=7.2.8, yet the flaw is in libheif inside sharp — Astro 7.2.8 fixes it by raising its own sharp floor. This app is on astro 6.4.8 and cannot reach 7.2.8 (6.4.8 is the final 6.x release), so the fix has to come from sharp directly.

sharp was already overridden, but at >=0.35.0 — which permits the vulnerable 0.35.0-0.35.3. The lockfile happened to resolve 0.35.4, so the protection was incidental rather than guaranteed. Floor now starts at the patched release.

Why it is also allowlisted

With patched sharp installed the advisory still matches on the astro version, so it needs an entry — written with its reasoning rather than as a bare id. The path is independently unreachable here, verified on disk:

check result
astro:assets / <Image> / <Picture> / getImage under web/src 0
AVIF / HEIC / HEIF files in the repo 0
web/src/assets/ does not exist
image.remotePatterns / image.domains not set, so remote images are refused
endpoints accepting an uploaded image none — all request.formData() call sites are text-only auth/admin forms
source files importing sharp 0

The 85 raster images all sit under web/public/ or vendored brand assets, which bypass the image pipeline. The entry records what would make it apply again and expires 2026-12-09.

This is a stopgap, not a decision to stay on Astro 6. The real fix is the 6->7 migration, tracked separately.

Verified locally

  • The workflow's own allowlist-filter logic: 0 violations, 1 allowed
  • Confirmed this is not a blanket suppression: injecting a synthetic unrelated HIGH advisory into a copy of the report still failed the filter (exit 1)

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
islamwiki Ready Ready Preview Sep 9, 2026 3:57pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
ummat-islamwiki Ignored Ignored Preview Sep 9, 2026 3:57pm UTC

Request Review

…dvisory

The scheduled audit failed on one CRITICAL finding, GHSA-26w7-cxv4-gfx2,
"Astro: remote code execution through AVIF image optimization".

The advisory ranges on astro >=7.2.8, but the flaw is not in Astro's own
source. It lives in libheif inside sharp, and Astro 7.2.8 fixes it only by
raising its own sharp floor. This app is on astro 6.4.8 and cannot reach
7.2.8, since 6.4.8 is the final 6.x release, so the fix has to come from
sharp directly.

sharp was already overridden, but at >=0.35.0, which permits the vulnerable
0.35.0-0.35.3. The lockfile happened to resolve 0.35.4, so the protection was
incidental rather than guaranteed. The floor now starts at the patched
release.

With patched sharp installed the advisory still matches on the astro version,
so it is allowlisted, with the reasoning written down rather than a bare id.
The path is independently unreachable here. There is no astro:assets,
<Image>, <Picture> or getImage usage anywhere under web/src, no AVIF, HEIC or
HEIF files in the repo, no web/src/assets/, no image.remotePatterns (so
remote images are refused), no endpoint that accepts an uploaded image, and
no source file importing sharp. The entry records what would make it apply
again and expires 2026-12-09.

This is a stopgap, not a decision to stay on Astro 6. The real fix is the
6->7 migration, tracked as a separate PCI.

Verified locally. The workflow's own allowlist-filter logic reports 0
violations and 1 allowed. Confirmed the entry is not a blanket suppression by
injecting a synthetic unrelated HIGH advisory into a copy of the report; the
filter still failed, exit 1.
@acamarata
acamarata force-pushed the fix/deps-audit-2026-09-09 branch from 3ebe9c4 to 1a1898a Compare September 9, 2026 15:56
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🟢 Rampart Security Gate — CLEAN

Tool CRITICAL HIGH MEDIUM LOW
(no findings)

Totals: 0 critical · 0 high · 0 medium · 0 low

Mode: RAMPART_ENFORCE=warn

@acamarata
acamarata merged commit 87935df into main Sep 9, 2026
19 checks passed
@acamarata
acamarata deleted the fix/deps-audit-2026-09-09 branch September 9, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant