Repository navigation
Upgrade Astro to 7.3.5 to fix Sharp/libheif RCE advisory - #44
Merged
Merged
Conversation
Astro < 7.2.8 bundles a Sharp (0.34.x) whose libheif can be exploited via a malicious AVIF image. There is no 5.x backport, so upgrade to Astro 7, which pulls in sharp 0.35.5. Astro 7 follow-ups: - Node 20 -> 22 in the Dockerfile and deploy workflow (Astro 7 needs >= 22.12) - Add @astrojs/markdown-remark and pass remark plugins via unified() - Set compressHTML: true to keep Astro 5's whitespace handling - Drop the missing owl.video.play.png reference and IE star hacks, which the new Vite/LightningCSS pipeline rejects Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the critical Dependabot alert for
astro< 7.2.8: a libheif vulnerability in the Sharp image service that can lead to remote code execution when a malicious AVIF image is processed. Astro didn't release a 5.x fix, so this upgrades from 5.18.2 to 7.3.5. That also moves Sharp from 0.34.5 to 0.35.5, above the required 0.35.4. Most of the other open alerts are on the same packages, so this should close them as well.The site doesn't use Astro's image optimization (
<Image>,<Picture>,getImage), so the real risk was low. This removes the vulnerable code anyway.Changes
astro^5.2.0 → ^7.3.5,@astrojs/check→ ^0.9.10Dockerfileanddeploy.yml@astrojs/markdown-remark; remark plugins now go throughprocessor: unified({...})compressHTML: trueurl("owl.video.play.png")*display/*zoomIE hacksTesting
main(Astro 5) and on this branch (Astro 7) in Docker: both produce 266 pages./404and/thanks,data-page-urlnow ends in.htmlinstead of/. That attribute only drives nav highlighting, and neither page is in the nav.astro checkreports the same 27 errors before and after. They come from existing table markup in a few.astropages.Local dev note:
./serve.shbind-mounts the oldnode_modulesfrom your machine, so rundocker compose run --rm web npm cionce after pulling.🤖 Generated with Claude Code