CVE-2022-24815
JavaScript vulnerability analysis and mitigation

Overview

JHipster, a development platform for generating and deploying modern web applications and microservice architectures, was found to contain a SQL Injection vulnerability (CVE-2022-24815) affecting applications generated with the 'reactive with Spring WebFlux' option enabled and SQL databases using r2dbc. The vulnerability was discovered in versions 7.0.0 through 7.8.0 and patched in version 7.8.1. Applications created without 'reactive with Spring WebFlux' and applications with NoSQL databases are not affected, though microservice Gateways may be impacted as they are reactive by default (GitHub Advisory).

Technical details

The vulnerability exists in the findAllBy(Pageable pageable, Criteria criteria) method of entity repository classes generated in affected applications. The issue stems from unsanitized where clauses using Criteria for queries, where user input is passed directly through the criteria. The root cause lies in the EntityManager.java class when creating the where clause via Conditions.just(criteria.toString()). The just method accepts the literal string provided, and Criteria's toString method returns a plain string without sanitization, allowing any SQL input to be executed (GitHub Advisory). The vulnerability has been assigned a CVSS v3.1 base score of 8.1 HIGH (Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) (NVD).

Impact

When exploited, this vulnerability allows attackers to perform SQL injection attacks that could potentially lead to unauthorized database access, data manipulation, or even database structure modification. For example, an attacker could craft malicious input that would allow them to execute arbitrary SQL commands, including dropping tables or accessing sensitive data (GitHub Issue).

Mitigation and workarounds

The issue has been patched in version 7.8.1 by removing the findAllBy(Pageable pageable, Criteria criteria) method from entity repositories and replacing org.springframework.data.relational.core.query.Criteria support with org.springframework.data.relational.core.sql.Condition. For users unable to upgrade, it is recommended to be careful when combining criterias and conditions and avoid passing user-provided criteria to the createSelect method of EntityManager. Users with existing reactive applications generated by impacted versions should audit for use of Criteria and take appropriate actions (GitHub Advisory).

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-58362HIGH7.5
  • JavaScriptJavaScript
  • hono
NoYesSep 05, 2025
CVE-2025-58358HIGH7.5
  • JavaScriptJavaScript
  • mcp-markdownify-server
NoYesSep 04, 2025
CVE-2025-58179HIGH7.2
  • JavaScriptJavaScript
  • @astrojs/cloudflare
NoYesSep 05, 2025
CVE-2025-55305MEDIUM6.1
  • JavaScriptJavaScript
  • electron
NoYesSep 04, 2025
CVE-2025-58064LOW2.3
  • JavaScriptJavaScript
  • @ckeditor/ckeditor5-clipboard
NoYesSep 04, 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