{"id":"CVE-2022-24815","published":"2022-04-11T19:25:13Z","modified":"2025-04-22T18:16:34Z","title":"SQL Injection when creating an application with Reactive SQL backend","vendor":"jhipster","product":"generator-jhipster","tier":"tail","description":{"text":"JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures. SQL Injection vulnerability in entities for applications generated with the option \"reactive with Spring WebFlux\" enabled and an SQL database using r2dbc. Applications created without \"reactive with Spring WebFlux\" and applications with NoSQL databases are not affected. Users who have generated a microservice Gateway using the affected version may be impacted as Gateways are reactive by default. Currently, SQL injection is possible in the findAllBy(Pageable pageable, Criteria criteria) method of an entity repository class generated in these applications as the where clause using Criteria for queries are not sanitized and user input is passed on as it is by the criteria. This issue has been patched in v7.8.1. Users unable to upgrade should be careful when combining criterias and conditions as the root of the issue lies in the `EntityManager.java` class when creating the where clause via `Conditions.just(criteria.toString())`. `just` accepts the literal string provided. Criteria's `toString` method returns a plain string and this combination is vulnerable to sql injection as the string is not sanitized and will contain whatever used passed as input using any plain SQL.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01377,"percentile":0.72748,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/jhipster/generator-jhipster/security/advisories/GHSA-qjmq-8hjr-qcv6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jhipster/generator-jhipster/issues/18269","tags":["x_refsource_MISC"]},{"url":"https://github.com/jhipster/generator-jhipster/commit/c220a210fd7742c53eea72bd5fadbb96220faa98","tags":["x_refsource_MISC"]}],"priority":{"score":20.2,"factors":[{"name":"EPSS percentile","points":14.55},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"jhipster","affectedVersions":[{"vendor":"jhipster","product":"generator-jhipster","versions":[">= 7.0.0, < 7.8.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-04-22T15:43:58.432237Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"generator-jhipster","vulnerableRanges":[">=7.0.0, <7.8.1"],"patched":["7.8.1"],"from":["GHSA-qjmq-8hjr-qcv6"],"provenance":"source"}],"summary":{"text":"The flaw is an SQL injection vulnerability in the entity repository code of JHipster's generator-jhipster, affecting applications generated with the \"reactive with Spring WebFlux\" option and an SQL database accessed through r2dbc. An attacker who can reach such an application over the network, without needing credentials or user interaction, can inject SQL through the findAllBy(Pageable, Criteria) method because criteria strings built via Conditions.just(criteria.toString()) are not sanitised, with the risk being highest when criteria and conditions are combined in an affected version.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:33Z"},"euvd":{"id":"EUVD-2022-1817","exploited":false,"provenance":"source"}}