CVE-2025-57317
Description
apidoc-core is the core parser library to generate apidoc result following the apidoc-spec. A Prototype Pollution vulnerability in the preProcess function of apidoc-core versions thru 0.15.0 allows attackers to inject properties on Object.prototype via supplying a crafted payload, causing denial of service (DoS) as the minimum consequence.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A prototype pollution vulnerability in apidoc-core <=0.15.0 allows attackers to inject properties on Object.prototype via crafted payloads, leading to denial of service.
Vulnerability
Overview
The preProcess function within the apidoc-core library, specifically in the apidoc-core/lib/workers/api_body_title module, suffers from a prototype pollution vulnerability (CWE-1321). The function improperly restricts modifications to object prototypes when processing nested data structures in API documentation files. This allows an attacker to supply a crafted payload containing specially crafted "define" properties, which are then merged into internal JavaScript objects without sufficient validation [1][3].
Attack
Vector and Exploitation
An attacker can exploit this by providing a malicious API documentation file that includes a crafted payload designed to pollute the Object.prototype. The vulnerability is triggered during the parsing phase, when the preProcess function merges user-controlled data into its internal state. The attack does not require authentication and can be delivered via any method that allows the attacker to supply a malformed documentation file to the parser [3]. The minimum consequence is denial of service (DoS), as the polluted prototype can cause unexpected behavior or crashes in the application [1].
Impact
Successful prototype pollution in apidoc-core allows an attacker to inject properties on Object.prototype. This can lead to a denial of service condition as the most immediate impact, but may also cause unintended behavior in all objects within the application. The vulnerability affects all versions of apidoc-core through 0.15.0 [1][3].
Mitigation
As of the publication date, users are advised to check for updates to the apidoc-core library and apply any patches that address prototype pollution in the preProcess function. No official patch has been mentioned in the available references. Until a fix is available, users may consider input validation or sanitization of API documentation files before processing [2].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
apidoc-corenpm | <= 0.15.0 | — |
Affected products
1- apidoc-core/apidoc-coredescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-5q53-78f2-6gf8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-57317ghsaADVISORY
- github.com/OrangeShieldInfos/PoCs/tree/main/JavaScript/prototype-pollution/CVE-2025-57317ghsaWEB
- github.com/VulnSageAgent/PoCs/blob/main/JavaScript/prototype-pollution/apidoc-core%400.15.0/index.jsghsaWEB
News mentions
0No linked articles in our index yet.