CVE-2025-60542: TypeORM vulnerable to SQL injection via crafted request to repository.save or repository.update
Affects typeormSource GCVE Database
Not known to be exploited · CVSS 6.5 Medium : upgrade to 0.3.26 when convenient.
Data as of 29 Oct 2026, 23:31 UTC
- Patch
- Available – fixed in 0.3.26
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Oct 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade typeorm to 0.3.26.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmtypeorm | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in TypeORM version 0.3.26. Users should upgrade to version 0.3.26 or later to remediate this vulnerability. No additional mitigation steps are required if the upgrade is applied.
Description
TypeORM versions prior to 0.3.26 are vulnerable to an SQL injection flaw via crafted requests to repository.save or repository.update methods. The vulnerability arises because the underlying mysql2 driver defaults the stringifyObjects option to false, causing improper SQL stringification of nested objects. This allows attackers to inject additional columns and manipulate SQL update queries.
References
- nvd.nist.gov/vuln/detail/CVE-2025-60542 (opens in a new tab)
- github.com/typeorm/typeorm/pull/11574 (opens in a new tab)
- github.com/typeorm/typeorm/commit/d57fe3bd8578b0b8f9847647fd046bccf825a7ef (opens in a new tab)
- github.com/mysqljs/sqlstring/blob/cd528556b4b6bcf300c3db515026935dedf7cfa1/lib/SqlString.js (opens in a new tab)
- github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/base/connection.js (opens in a new tab)
- github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/connection_config.js (opens in a new tab)
- github.com/typeorm/typeorm/blob/0.3.25/src/driver/mysql/MysqlConnectionOptions.ts (opens in a new tab)
- github.com/typeorm/typeorm/releases/tag/0.3.26 (opens in a new tab)
- github.com/typeorm/typeorm/releases?q=security&expanded=true (opens in a new tab)
- medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453 (opens in a new tab)
- github.com/typeorm/typeorm (opens in a new tab)