Bump pdf.js past CVE-2024-4367; tighten img-src; fix heading order#8
Merged
Conversation
Security: pdf.js was pinned to 4.0.379, which predates the fix (4.2.67) for CVE-2024-4367 — arbitrary JavaScript execution when rendering a crafted PDF via the Type1 FontMatrix path. The app renders user-supplied "reference book" PDFs (200 MB cap), so a booby-trapped file shared in a study group is the realistic vector. Runtime exploit is already blocked by the eval-free CSP (no 'unsafe-eval'), but bump to 4.2.67 so the vulnerable code isn't shipped at all. Both CDN URLs updated; SW cache bumped to aplus-study-v127. Hardening: img-src allowed any https: host though no content (verified: 0 external image URLs across data/) uses remote images — unused headroom that the raw-HTML "concept fix" reader could turn into a tracking-pixel IP leak. Tighten to 'self' data: blob:' in the meta CSP and _headers. Accessibility (WCAG 1.3.1): the quiz/mock results screen jumped h1→h3 (the "Missed" and "By objective" section titles), so heading navigation skipped a level. Promote both to h2 for a contiguous outline; CSS is class-based so styling is unchanged. Verified: 77/77 node tests pass, question data validates clean. The pdf.js/CSP/heading changes are further gated by the CI Puppeteer smoke (axe + PDF rendering) on the PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CR5oMcpxdjeJr7u6mnDdC
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.
Fleet-wide expert-review hardening pass.
img-srcto'self' data: blob:(0 external images in data).Verified: 77/77 node tests, question data validates clean. CI Puppeteer smoke (axe + PDF render) gates the PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_011CR5oMcpxdjeJr7u6mnDdC
Generated by Claude Code