CVE-2022-22881: SQL Injection in Jeecg-boot

Summary

17/02/2022
No i
Critical
9.8

CVE-2022-22881: SQL Injection in Jeecg-boot. Affects org.jeecgframework.boot:jeecg-boot-base versions < 3.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Jeecg-boot is a Maven-based package that provides a framework for developing enterprise-level applications. It offers various features and components to facilitate rapid development. However, Jeecg-boot v3.0 is vulnerable to a SQL injection attack. This vulnerability arises due to improper handling of user input in the code parameter of the /sys/user/queryUserComponentData endpoint.

Vulnerability Detail

The SQL injection vulnerability in Jeecg-boot v3.0 allows an attacker to manipulate the SQL queries executed by the application. By injecting malicious SQL code into the code parameter, an attacker can bypass input validation and gain unauthorized access to the database. This can lead to data theft, modification, or even complete compromise of the application and its underlying infrastructure. The vulnerability has a CVSS score of 9.8 (Critical).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, it is advised to implement proper input validation and sanitization of the code parameter in the affected endpoint. This can be achieved by using parameterized queries or prepared statements to ensure that user input is treated as data and not executable code. Here is an example of how to use prepared statements in Java:

String code = request.getParameter("code");
String sql = "SELECT * FROM users WHERE code = ?";
PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1, code);
ResultSet resultSet = statement.executeQuery();
// Process the result set

By using prepared statements, the user input will be automatically escaped, preventing SQL injection attacks.

Conclusion

Jeecg-boot v3.0 is vulnerable to a critical SQL injection vulnerability. To mitigate this issue, it is crucial to update Jeecg-boot to version 3.1.0 or a secure release that includes the necessary fix. Implementing proper input validation and sanitization techniques is also advised as a temporary workaround. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.jeecgframework.boot:jeecg-boot-base →

Share this vulnerability

FAQ

Jeecg-boot is a Maven-based package that provides a framework for developing enterprise-level applications. It offers various features and components to facilitate rapid development.

A SQL injection vulnerability occurs when an application does not properly validate or sanitize user input before incorporating it into SQL queries. This allows an attacker to manipulate the SQL queries and potentially gain unauthorized access to the database.

The SQL injection vulnerability in Jeecg-boot v3.0 can lead to unauthorized access to the database, data theft, data modification, or complete compromise of the application and its underlying infrastructure.

The CVSS score of this vulnerability is 9.8, which indicates a critical severity level.

To fix this vulnerability, it is recommended to update Jeecg-boot to version 3.1.0 or any subsequent secure release that includes a patch for the SQL injection issue.

Related vulnerabilities

Recent vulnerabilities recorded for org.jeecgframework.boot:jeecg-boot-base.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback