CVE-2025-60542
JavaScript vulnerability analysis and mitigation

Overview

SQL Injection vulnerability discovered in TypeORM versions before 0.3.26 affecting applications using MySQL/mysql2 driver. The vulnerability (CVE-2025-60542) exists due to the sqlstring call using stringifyObjects default to false, which allows attackers to manipulate SQL queries through crafted requests to repository.save or repository.update methods (Medium Blog, NVD).

Technical details

The vulnerability stems from TypeORM's reliance on the mysql2 driver without setting stringifyObjects: true. When developers use repository.save or repository.update methods, nested JSON inputs could be injected into SQL queries. The CVSS v3.1 base score is 6.5 (MEDIUM) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N. The vulnerability is classified as CWE-89: Improper Neutralization of Special Elements used in an SQL Command (NVD).

Impact

The vulnerability allows attackers to bypass field-level update restrictions and modify arbitrary columns, including sensitive fields such as user roles. This could potentially lead to privilege escalation depending on the application context. The attack works by manipulating nested JSON objects in requests, which can result in unexpected SQL query modifications (Medium Blog).

Mitigation and workarounds

The vulnerability has been fixed in TypeORM version 0.3.26 by setting stringifyObjects to true by default. Users should upgrade immediately to version 0.3.26 or later. Alternative mitigations include avoiding passing nested JSON objects directly into repository.save/update methods, flattening and validating input data before persistence, and enforcing input validation and whitelisting at the application level (TypeORM Release, Medium Blog).

Community reactions

The vulnerability was discovered during a client engagement by security researcher Javad Alizada, with assistance from Rashad Aliyev and Kamran Asgarov. The TypeORM team responded promptly by releasing version 0.3.26 with the fix, and the community has shown active engagement in updating to the patched version (Medium Blog).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-62726HIGH8.8
  • JavaScriptJavaScript
  • n8n
NoYesOct 30, 2025
CVE-2025-59837HIGH7.2
  • JavaScriptJavaScript
  • astro
NoYesOct 28, 2025
GHSA-5jpx-9hw9-2fx4MEDIUM6.9
  • JavaScriptJavaScript
  • next-auth
NoYesOct 29, 2025
CVE-2025-60542MEDIUM6.5
  • JavaScriptJavaScript
  • typeorm
NoYesOct 29, 2025
CVE-2025-64118MEDIUM6.1
  • JavaScriptJavaScript
  • tar
NoYesOct 30, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management