CVE-2025-60542 Details
Description
SQL Injection vulnerability in TypeORM before 0.3.26 via crafted request to repository.save or repository.update due to the sqlstring call using stringifyObjects default to false.
A SQL injection vulnerability has been identified in TypeORM versions prior to 0.3.26, specifically when used with MySQL or the mysql2 client. The issue arises because TypeORM did not set the 'stringifyObjects' option to true by default, allowing nested JSON objects to be injected into SQL queries via 'repository.save' or 'repository.update' methods. This vulnerability could be exploited to bypass field-level update restrictions, modify arbitrary columns such as user roles, and potentially escalate privileges, depending on the context.
Upgrade TypeORM to version 0.3.26 or later. If using TypeORM with MySQL, ensure that 'stringifyObjects' is set to true in the connection options. After updating, review and test application functionality to ensure that the update has been applied correctly and that no new issues have been introduced.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 29, 2025CISA-ADP
Assessed Oct 30, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/typeorm/typeorm/pull/11574 | [email protected] | Issue TrackingVendor |
| https://github.com/typeorm/typeorm/releases?q=security&expanded=true | [email protected] | Release NotesVendor |
| https://github.com/typeorm/typeorm/releases/tag/0.3.26 | [email protected] | Release NotesVendor |
| https://medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453 | [email protected] | ExploitRemedyTechnical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| TypeORM | <= 0.3.25 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 27, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 30, 2025 | CVE Modified | CISA-ADP |
| Oct 29, 2025 | New CVE Received | [email protected] |
Volerion