CVE-2025-60542 TypeORM vulnerable to SQL injection via crafted request to repository.save or repository.update

Medium 6.5 Published Updated

Attackers can execute arbitrary SQL commands via crafted requests to repository methods, potentially reading or modifying database contents.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-60542?

CVE-2025-60542 is a medium-severity SQL injection vulnerability in n/a, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-89

Which versions are affected by CVE-2025-60542?

2 open source packages ship an affected version, including typeorm.

PackageAffectedFixed in
typeorm npmAll versions0.3.26
typeorm npmAll versions0.3.26

How do I fix CVE-2025-60542?

Upgrade typeorm to 0.3.26 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2025-60542 being exploited?

There is no known exploitation of CVE-2025-60542 in the wild and no public exploit code.

Sources

Also known as GHSA-q2pj-6v73-8rgj, ROOT-APP-NPM-CVE-2025-60542.

Is CVE-2025-60542 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free