# CVE-2020-8158: TypeORM prototype pollution

Source: https://junglewise.ai/threats/cve-2020-8158-typeorm-prototype-pollution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-05-07. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2020-8158 · Severity: low · CVSS 3.1 · Published 2021-05-07

TypeORM is a popular Node.js library used to interact with databases through an object-oriented interface. A prototype pollution vulnerability in versions before 0.2.25 allows attackers to modify object properties without authentication, potentially leading to denial of service or SQL injection attacks that could compromise database integrity or availability.

Technologies: [typeorm (npm)](https://junglewise.ai/threats/technologies/typeorm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2020-8158 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-8158 being exploited in the wild.

**How severe is CVE-2020-8158?** Low severity, with a CVSS score of 3.1, published 7 May 2021.

**Which products and versions are affected?** typeorm (npm) SEMVER:introduced=0,fixed=0.2.25.

**Is there a fix for CVE-2020-8158?** Yes. typeorm (npm): upgrade to 0.2.25 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2020-8158?** Check whether you run typeorm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- typeorm (npm): upgrade to 0.2.25 or later

  ```sh
  npm install typeorm@0.2.25
  ```


## Technical details

This is a prototype pollution vulnerability (CWE-1321, CWE-471) affecting TypeORM versions prior to 0.2.25. The vulnerability allows attackers to add or modify JavaScript object properties through specially crafted input, bypassing normal property constraints. No authentication or user interaction is required; the vulnerability is network-accessible. Successful exploitation can lead to denial of service conditions or facilitate SQL injection attacks against the underlying database. The fix is available in version 0.2.25 and later.

## Affected products

- TypeORM TypeORM <0.2.25

## Identifiers

- CVE-2020-8158
- GHSA-pf2j-9qmp-jqr2

## Timeline

- 2020-09-18: disclosed: NVD published
- 2021-05-07: advisory: GHSA advisory published
- 0.2.25: patched

## References

- [https://hackerone.com/reports/869574](https://hackerone.com/reports/869574)

## Related threats

- [TypeORM migration:generate template-literal code injection](https://junglewise.ai/threats/cve-2026-73651-typeorm-migration-generate-template-literal-code-injection)
- [TypeORM SQL injection in UpdateQueryBuilder/SoftDeleteQueryBuilder orderBy](https://junglewise.ai/threats/typeorm-sql-injection-in-updatequerybuilder-softdeletequerybuilder-9de71c2e)
- [TypeORM SQL injection in repository.save and repository.update](https://junglewise.ai/threats/cve-2025-60542-typeorm-sql-injection-in-repository-save-and-repository-update)
- [TypeORM SQL injection in findOne](https://junglewise.ai/threats/cve-2022-33171-typeorm-sql-injection-in-findone)
- [typeorm SQL Injection via unvalidated field names](https://junglewise.ai/threats/typeorm-sql-injection-via-unvalidated-field-names-8d623bc7)
