CVE-2026-34220
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-34220 is a SQL injection vulnerability in MikroORM, a TypeScript ORM for Node.js, where specially crafted objects are interpreted as raw SQL query fragments. It affects all versions of @mikro-orm/core prior to 6.6.10 and versions 7.0.0 through 7.0.5. The vulnerability was published on March 27, 2026, by the MikroORM maintainer (B4nan) and added to the GitHub Advisory Database on March 29, 2026. It carries a CVSS v3.1 base score of 9.8 (Critical) and a CVSS v4.0 base score of 9.3 (Critical) (GitHub Advisory, MikroORM Advisory).

Technical details

The root cause (CWE-89) is improper neutralization of special elements in SQL commands, stemming from MikroORM's use of duck-typed detection of internal ORM marker properties. Because the ORM identified "raw SQL fragment" objects by checking for the presence of specific string-named properties, an attacker could craft a plain JavaScript object that mimics these internal markers, causing the ORM to treat user-supplied input as a trusted raw SQL fragment rather than a parameterized value. The vulnerability is exploitable over the network without authentication or user interaction when untrusted input is passed directly to ORM write APIs including wrap(entity).assign(userInput) followed by em.flush(), em.nativeUpdate(), em.nativeInsert(), or em.create() followed by em.flush(). The fix replaces duck-typed string property checks with JavaScript symbol-based markers, which cannot be replicated by external user input (GitHub Advisory, MikroORM Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to inject arbitrary SQL commands into queries executed by the affected application, resulting in unauthorized read access to sensitive database contents, unauthorized modification or deletion of data, and potentially full database compromise. Applications that pass user-controlled input directly to MikroORM query construction APIs without prior type validation or strict schema enforcement are at highest risk. Depending on the database configuration, exploitation could also enable command execution at the OS level (e.g., via xp_cmdshell in MSSQL), facilitating lateral movement beyond the database tier (GitHub Advisory, MikroORM Advisory).

Exploitability

As of the time of reporting, no public proof-of-concept exploit code was confirmed, and there is no evidence of active in-the-wild exploitation (Feedly). However, a repository at https://github.com/EQSTLab/CVE-2026-34220 appeared in tracking data in late April 2026, suggesting that public research or PoC development may be underway. The EPSS score is approximately 0.015% (4th percentile), indicating a currently low but non-zero probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no specific threat actor attribution has been reported (Feedly).

Exploitation steps

  1. Reconnaissance: Identify Node.js applications using @mikro-orm/core versions prior to 6.6.10 or 7.0.0–7.0.5 by inspecting publicly accessible package.json files, npm lock files, or application error messages that reveal ORM version information.
  2. Identify vulnerable input paths: Locate application endpoints that accept user-controlled JSON or object input and pass it directly to MikroORM write APIs such as wrap(entity).assign(userInput), em.nativeUpdate(), em.nativeInsert(), or em.create().
  3. Craft malicious object: Construct a JavaScript object that mimics MikroORM's internal duck-typed raw SQL marker properties (e.g., by including the specific string property names the ORM checks for), embedding a malicious SQL fragment as the value.
  4. Submit payload: Send the crafted object as part of an HTTP request (e.g., JSON body in a POST/PUT request) to the vulnerable endpoint, causing the ORM to interpret the injected value as a trusted raw SQL fragment rather than a parameterized input.
  5. Execute injected SQL: The ORM incorporates the raw SQL fragment into the generated query without sanitization, executing attacker-controlled SQL against the underlying database — enabling data exfiltration, modification, deletion, or (database-permitting) OS command execution (GitHub Advisory, MikroORM Advisory).

Indicators of compromise

  • Logs: Application or database logs showing unexpected or malformed SQL queries containing raw SQL fragments (e.g., UNION SELECT, DROP TABLE, --, or stacked queries) originating from ORM-generated statements; unusual query patterns in database audit logs tied to ORM write operations.
  • Network: Anomalous HTTP POST/PUT requests to application endpoints with JSON bodies containing object properties that resemble MikroORM internal marker names alongside SQL syntax strings.
  • Application Behavior: Unexpected database errors or query failures logged by the Node.js application related to em.flush(), em.nativeUpdate(), em.nativeInsert(), or em.create() calls; unusual data appearing in or disappearing from database tables without corresponding application-level actions.
  • File System: Presence of the EQSTLab/CVE-2026-34220 repository or related tooling on attacker-controlled infrastructure identified through threat intelligence feeds.

Mitigation and workarounds

The primary remediation is to upgrade @mikro-orm/core to version 6.6.10 (for the v6 branch) or 7.0.6 (for the v7 branch), which replace duck-typed string property checks with symbol-based markers that cannot be spoofed by user input (GitHub Advisory, MikroORM Advisory). As a defense-in-depth measure prior to patching, applications should validate and enforce strict type/schema checks on all user-controlled input before passing it to any MikroORM API. Applications that already enforce strict schema validation (e.g., using Zod, Joi, or TypeScript class-validator) before ORM calls are not affected by this vulnerability.

Community reactions

Security Online covered the vulnerability shortly after disclosure, highlighting the 9.3 CVSS score and the SQL injection risk in MikroORM (SecurityOnline). Red Hat also tracked the CVE, indicating relevance to downstream consumers of Node.js ecosystem packages (Red Hat). Community discussion on Bluesky noted the vulnerability shortly after NVD publication, reflecting standard security community awareness activity.

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-2026-45618CRITICAL10
  • JavaScript logoJavaScript
  • liquidjs
NoYesAug 11, 2026
CVE-2026-48170CRITICAL9.1
  • JavaScript logoJavaScript
  • scim-patch
NoYesAug 07, 2026
CVE-2026-48007HIGH8.6
  • JavaScript logoJavaScript
  • @element-hq/element-call-embedded
NoYesAug 07, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • gemini-cli
NoYesAug 07, 2026
CVE-2026-71850MEDIUM4.8
  • JavaScript logoJavaScript
  • langfuse-fips-3
NoYesAug 07, 2026

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