Intel

AIKIDO-2025-10205

typeorm is vulnerable to Improper String Escaping

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Apr 3, 2025
April 3, 2025

70

CVE Score

High

Improper String Escaping

Are you affected? Scan for Free

TL;DR

Affected versions of this package lack sufficient backlash and single quote escaping in the methods used for drives, migrations, and query runners. It unsafely utilizes String.replace() for escaping, which fails to handle repeated special characters or escape sequences properly. This vulnerability allows attackers to create malicious input with unescaped special characters, potentially breaking the query syntax and enabling SQL injection attacks if the improperly escaped string is handled in a critical context.

How do I fix this?

Upgrade the TypeORM library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Package

Versions

0.3.0 - 0.3.21

Fixed in 0.3.22

Background info

typeorm is vulnerable to Improper String Escaping in versions 0.3.0 - 0.3.21.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea