CVE-2020-8158
Description
Prototype pollution in TypeORM < 0.2.25 allows attackers to modify Object properties, enabling DoS or SQL injection.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Prototype pollution in TypeORM < 0.2.25 allows attackers to modify Object properties, enabling DoS or SQL injection.
Vulnerability
Description
CVE-2020-8158 is a prototype pollution vulnerability in the TypeORM object-relational mapping library for TypeScript and JavaScript. The flaw exists in versions prior to 0.2.25, where insufficient input validation allows an attacker to inject properties into an object's prototype chain using a crafted payload. Prototype pollution occurs when user-controlled data is merged or assigned into an object without proper sanitization, enabling the attacker to alter the behavior of all objects of that type [1].
Exploitation
An attacker can exploit this vulnerability by sending specially crafted input that, when processed by TypeORM's query building or object parsing functions, pollutes the Object prototype. This does not require authenticated access if the application exposes endpoints that handle unsanitized user input through affected TypeORM methods. The attack surface includes any application that uses TypeORM for database operations and accepts JSON or other structured data from users [1].
Impact
Successful exploit allows the attacker to add or modify properties on all objects, leading to denial of service (e.g., by overriding critical properties that cause crashes) or SQL injection (by altering property values that are interpolated into SQL queries without proper escaping). The severity is elevated because prototype pollution can propagate across the entire application's object model, potentially affecting security-sensitive operations [1].
Mitigation
TypeORM released version 0.2.25, which patches the vulnerability by properly sanitizing inputs to prevent prototype pollution. Users are strongly advised to upgrade to the latest version. No workaround is documented; upgrading is the only reliable mitigation. The issue was reported via HackerOne and is publicly disclosed, increasing the risk of exploitation if unpatched instances remain in production [1].
AI Insight generated on May 21, 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 |
|---|---|---|
typeormnpm | < 0.2.25 | 0.2.25 |
Affected products
2- TypeORM/TypeORMdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-pf2j-9qmp-jqr2ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-8158ghsaADVISORY
- hackerone.com/reports/869574ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.