Advisory

PYSEC-2026-1764

Also known as: CVE-2024-38526, GHSA-5vgj-ggm4-fg62

Summary

pdoc embeds link to malicious CDN if math mode is enabled

Details

Impact

Documentation generated with pdoc --math linked to JavaScript files from polyfill.io.
The polyfill.io CDN has been sold and now serves malicious code.

Users who produce documentation with math mode should update immediately. All other users are unaffected.

Patches

This issue has been fixed in pdoc 14.5.1.

References

https://github.com/mitmproxy/pdoc/pull/703
https://sansec.io/research/polyfill-supply-chain-attack

Timeline

  • [2024-06-25] https://sansec.io/research/polyfill-supply-chain-attack is published.
  • [2024-06-25 20:54 UTC] Issue reported to the pdoc project by @adhintz.
  • [2024-06-25 21:33 UTC] Patched version released.
  • [2024-06-25 21:37 UTC] Security advisory published.
  • [2024-06-25 23:49 UTC] CVE-2024-38526 assigned by GitHub.

Severity

High Basis: CVSS v3 score 7.2, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L

Dates

Published
2026-07-07 14:34 UTC
Modified
2026-07-07 17:47 UTC

Affected packages and fixes

pdoc

PyPI · All systems

Affected

  • introduced 0, fixed 14.5.1 (ecosystem)

Fixed versions

14.5.1

Fix

  • Fixed version 14.5.1
    pip install --upgrade pdoc==14.5.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences