Skip to content

Remove malicious polyfill.io dependency - #8

Merged
McDic merged 1 commit into
masterfrom
fix/remove-polyfill-io-20260609
Jun 8, 2026
Merged

McDic merged 1 commit into
masterfrom
fix/remove-polyfill-io-20260609

Conversation

@McDic

@McDic McDic commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the https://polyfill.io/v3/polyfill.min.js?features=es6 script from extra_javascript in mkdocs.yml.

The polyfill.io CDN domain was sold in mid-2024 to a malicious operator that injected credential-phishing / malicious-redirect code into the served script, affecting an estimated 100,000+ sites. This blog included it as part of the legacy MathJax setup recipe, which means visitors have been served the compromised script.

Why it's safe to remove

  • MathJax 3 (loaded via tex-mml-chtml.js) runs natively on all modern browsers; the es6 polyfill only ever backfilled legacy browsers like IE11.
  • The polyfill was not required or injected by mkdocs / mkdocs-material — it was a manual line in mkdocs.yml.
  • MathJax has since removed the polyfill recommendation from its own documentation.

Verification

  • Rebuilt with mkdocs build: 0 external polyfill.io references and 0 HTML files reference polyfill (remaining matches are only in mkdocs-material's own local search-worker sourcemap — harmless theme internals).
  • All 71 math-rendering pages still load MathJax correctly.

Notes

  • The built site/ is gitignored and deployed to the deploy branch, so the malicious script clears on the next deploy.
  • Unrelated: mkdocs-material is at 9.6.22 vs latest 9.7.6 (the ~= 9.6 pin already permits 9.7.x) — not changed here.

🤖 Generated with Claude Code

The polyfill.io CDN was sold in mid-2024 to a malicious operator that
served credential-phishing/redirect malware to visitors. This line was
part of the legacy MathJax setup recipe and is not required: MathJax 3
(tex-mml-chtml.js) runs natively on all modern browsers, so the es6
polyfill is unnecessary. Removing it eliminates the supply-chain risk.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@McDic McDic self-assigned this Jun 8, 2026
@McDic
McDic merged commit a96662a into master Jun 8, 2026
2 checks passed
@McDic
McDic deleted the fix/remove-polyfill-io-20260609 branch June 8, 2026 15:13
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