Skip to content

Bump pdf.js past CVE-2024-4367; tighten img-src; fix heading order#8

Merged
manderwall merged 1 commit into
mainfrom
claude/adoring-ptolemy-4KZZh
Jul 19, 2026
Merged

Bump pdf.js past CVE-2024-4367; tighten img-src; fix heading order#8
manderwall merged 1 commit into
mainfrom
claude/adoring-ptolemy-4KZZh

Conversation

@manderwall

Copy link
Copy Markdown
Owner

Fleet-wide expert-review hardening pass.

  • Security: bump pdf.js 4.0.379 → 4.2.67 (fixes CVE-2024-4367, arbitrary JS via crafted PDF the app renders); SW cache → v127.
  • Hardening: tighten img-src to 'self' data: blob: (0 external images in data).
  • Accessibility (WCAG 1.3.1): fix h1→h3 heading skip on the quiz/mock results screen.

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

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
@manderwall
manderwall merged commit 5edd012 into main Jul 19, 2026
3 checks passed
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.

2 participants