Skip to main content

TypeORM CVE-2025-60542

MEDIUM
SQL Injection (CWE-89)
2025-10-29 cve@mitre.org
6.5
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted object in API request
  2. Delivery
    Value reaches repository.save/update on MySQL driver
  3. Exploit
    sqlstring serializes object without proper escaping
  4. Execution
    Injected SQL alters the query
  5. Impact
    Read or modify unintended database records

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an application built on TypeORM (before 0.3.26) using the MySQL driver that passes attacker-influenced object values into repository.save or repository.update; the root cause is the sqlstring call relying on the default stringifyObjects: false, which allows a nested object to be serialized into the SQL statement rather than safely escaped. Limiting factors: the vulnerable code path is MySQL-driver specific (the fix only modifies MysqlDriver.ts), and exploitation depends on the application routing untrusted structured input (an object, not a plain scalar) into those persistence methods - applications that only pass scalar values or sanitize input are not exposed. Impact is bounded (CVSS C:L/I:L/A:N), indicating partial data read/modify rather than full database compromise.

Impact

This is a moderate, largely conditional risk rather than a drop-everything emergency. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N, base 6.5) reads as remotely reachable with low complexity and no privileges, but that scoring reflects the library in the abstract: the actual flaw (per the PR diff touching src/driver/mysql/MysqlDriver.ts and setting stringifyObjects: true) only manifests when an application passes attacker-controlled object values into repository.save or repository.update using the MySQL driver, so real exposure is application- and driver-dependent. The supporting signals point to lower urgency: EPSS is 0.27% (18th percentile), there is no CISA KEV listing (not actively exploited per available data), and the vuln.today Decision label is this_month rather than act_now/emergency. The confidentiality/integrity impact is rated Low and availability None, consistent with constrained SQL injection rather than full database takeover. These signals are mutually consistent - a genuine, patchable injection defect with limited real-world exploitation pressure - so this should be scheduled for prompt patching in normal maintenance, not treated as a critical incident. Note the PR:N in the vector describes the library having no built-in auth gate; whether a given deployment is truly unauthenticated depends on the surrounding application.

Exploit ScenarioDerived

A Node.js application uses TypeORM with the MySQL driver and persists a request-supplied object (for example a filter or entity payload) via repository.save or repository.update. Because sqlstring is invoked with stringifyObjects defaulting to false, a nested object in that input is serialized in a way that breaks out of the intended parameterization, letting the attacker alter the SQL statement and read or modify unintended rows. A Medium write-up documenting the issue exists, but the input does not confirm packaged, working exploit code.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

SQL injection in TypeORM's MySQL driver affects releases before 0.3.26 when an application passes attacker-influenced object values into repository.save or repository.update: the underlying sqlstring call runs with stringifyObjects defaulted to false, so nested objects are serialized into the SQL statement instead of being escaped. Exposure is conditional on the application routing untrusted structured input (an object rather than a plain scalar) into those persistence methods, and the assessed impact is partial data read or modification (C:L/I:L/A:N) rather than full database compromise. The vendor fix is released in 0.3.26; EPSS is 0.27% (18th percentile), the issue is not in CISA KEV, and no confirmed public exploit code was identified at time of analysis although a public technical write-up exists.

RemediationAI

Upgrade TypeORM to 0.3.26, which sets stringifyObjects: true in the MySQL driver connection options via pull request 11574 (release notes at https://github.com/typeorm/typeorm/releases/tag/0.3.26); vendor-released patch: 0.3.26. Where an immediate upgrade is not possible, the exposure is limited to code paths that feed untrusted objects into repository.save or repository.update on the MySQL driver, so coerce or reject non-scalar input at the persistence boundary and validate the shape of request payloads before they reach those methods, accepting that this shifts the burden onto every call site rather than fixing the driver. Also check the driver's connection options after upgrading, since the same change moves connectionLimit into the pool options object and may alter how existing pool sizing configuration is read. Track the vendor security release index (https://github.com/typeorm/typeorm/releases?q=security&expanded=true) for follow-up fixes, and treat this as a scheduled fix rather than an emergency: EPSS is 0.27% (18th percentile), there is no CISA KEV listing, and no confirmed public exploit code was identified at time of analysis.

Affected Packages

npm typeorm fix: 0.3.26

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

TypeORM is a TypeScript/JavaScript ORM for Node.js, and this flaw lives in the MySQL driver (src/driver/mysql/MysqlDriver.ts), which delegates query formatting to the sqlstring package. Because sqlstring's stringifyObjects option defaults to false, an object value handed to repository.save or repository.update can be rendered as part of the SQL text rather than being converted into a safely quoted literal, which is the CWE-89 improper-neutralization-of-special-elements root cause. The upstream pull request 11574 addresses it by explicitly setting stringifyObjects: true in the driver's connection options (the same diff also relocates connectionLimit into the pool options object). The change is MySQL-driver specific, and the accompanying release notes are in TypeORM 0.3.26, so other drivers are not covered by this fix.

Know when MySQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 6.5 MEDIUM

Remotely reachable via the app with no library-level auth (PR:N) and low complexity once untrusted objects hit save/update on MySQL; impact limited to partial read/modify, so C:L/I:L/A:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular Node.js/TypeScript ORM, but only the MySQL driver path is affected
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

More in MySQL

View all
CVE-2016-6662 CRITICAL POC
9.8 Sep 20

Oracle MySQL through 5.5.52, 5.6.x through 5.6.33, and 5.7.x through 5.7.15; MariaDB before 5.5.51, 10.0.x before 10.0.2

CVE-2012-5613 MEDIUM POC
6.0 Dec 03

MySQL 5.5.19 and possibly other versions, and MariaDB 5.5.28a and possibly other versions, when configured to assign the

CVE-2017-3599 HIGH POC
7.5 Apr 24

Vulnerability in the MySQL Server component of Oracle MySQL (subcomponent: Server: Pluggable Auth). Rated high severity

CVE-2012-2122 MEDIUM POC
5.1 Jun 26

sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x befor

CVE-2020-5398 HIGH
7.5 Jan 17

In Spring Framework, versions 5.2.x prior to 5.2.3, versions 5.1.x prior to 5.1.13, and versions 5.0.x prior to 5.0.16,

CVE-2012-5612 MEDIUM POC
6.5 Dec 03

Heap-based buffer overflow in Oracle MySQL 5.5.19 and other versions through 5.5.28, and MariaDB 5.5.28a and possibly ot

CVE-2012-5611 MEDIUM POC
6.5 Dec 03

Stack-based buffer overflow in the acl_get function in Oracle MySQL 5.5.19 and other versions through 5.5.28, and 5.1.53

CVE-2020-1967 HIGH POC
7.5 Apr 21

Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due

CVE-2016-6664 HIGH POC
7.0 Dec 13

mysqld_safe in Oracle MySQL through 5.5.51, 5.6.x through 5.6.32, and 5.7.x through 5.7.14; MariaDB; Percona Server befo

CVE-2015-3152 MEDIUM POC
5.9 May 16

Oracle MySQL before 5.7.3, Oracle MySQL Connector/C (aka libmysqlclient) before 6.1.3, and MariaDB before 5.5.44 use the

CVE-2026-24479 CRITICAL POC
9.8 Jan 27

HUSTOJ online judge has a path traversal vulnerability enabling arbitrary file access on the competition server.

CVE-2016-2105 HIGH
7.5 May 05

Integer overflow in the EVP_EncodeUpdate function in crypto/evp/encode.c in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy