CVE-2024-38526: Pdoc Pdoc Embeds Link To Malicious Vulnerability
HIGHCVE-2024-38526 is a HIGH (CVSS 7.2) pdoc embeds link to malicious vulnerability (General Security Weakness) affecting Pdoc libraries in the PyPI ecosystem. The issue involves pdoc embeds link to malicious cdn if math mode is enabled. Remediation is available by upgrading affected packages to version 14.5.1.
CVE-2024-38526 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L).
How to Fix CVE-2024-38526
To remediate this vulnerability, upgrade all affected Pdoc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pdoc>=14.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pdoc
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-38526, inspect your installed packages using pip:
pip show pdoc
Analyze the terminal output to locate any version of Pdoc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.5.1), your application is affected.
Note: The pip show pdoc command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Pdoc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-38526 Affected Pdoc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pdoc
|
PyPI |
< 14.5.1
|
14.5.1
|
References
Frequently Asked Questions
What is CVE-2024-38526?
Which Pdoc versions are affected?
What version fixes CVE-2024-38526?
Is pdoc affected?
What is the CVSS score of CVE-2024-38526?
What CWE is associated with CVE-2024-38526?
How can I check PyPI dependencies for CVE-2024-38526?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5vgj-ggm4-fg62",
"modified" : "2024-07-26T21:36:47Z",
"published" : "2024-06-25T22:23:30Z",
"aliases" : [ "CVE-2024-38526" ],
"summary" : "pdoc embeds link to malicious CDN if math mode is enabled",
"details" : "### Impact\n\nDocumentation generated with `pdoc --math` linked to JavaScript files from polyfill.io.\nThe polyfill.io CDN has been sold and now serves malicious code.\n\nUsers who produce documentation with math mode should update immediately. All other users are unaffected.\n\n### Patches\n\nThis issue has been fixed in pdoc 14.5.1.\n\n### References\n\nhttps://github.com/mitmproxy/pdoc/pull/703\nhttps://sansec.io/research/polyfill-supply-chain-attack\n\n### Timeline\n\n- **[2024-06-25]** https://sansec.io/research/polyfill-supply-chain-attack is published.\n- **[2024-06-25 20:54 UTC]** Issue reported to the pdoc project by @adhintz.\n- **[2024-06-25 21:33 UTC]** Patched version released.\n- **[2024-06-25 21:37 UTC]** Security advisory published.\n- **[2024-06-25 23:49 UTC]** CVE-2024-38526 assigned by GitHub.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pdoc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mitmproxy/pdoc/security/advisories/GHSA-5vgj-ggm4-fg62"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-38526"
}, {
"type" : "WEB",
"url" : "https://github.com/mitmproxy/pdoc/pull/703"
}, {
"type" : "WEB",
"url" : "https://github.com/mitmproxy/pdoc/commit/726b8f2e365fe8afeb3604a7c73d19b460395d58"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mitmproxy/pdoc"
}, {
"type" : "WEB",
"url" : "https://sansec.io/research/polyfill-supply-chain-attack"
}, {
"type" : "WEB",
"url" : "https://www.vicarius.io/vsociety/posts/polyfillio-in-pdoc-cve-2024-38526"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-25T22:23:30Z",
"nvd_published_at" : "2024-06-26T00:15:10Z"
}
}