# CVE-2022-41853: Remote code execution in HyperSQL DataBase

> Attackers can execute arbitrary code via SQL statements in HyperSQL database due to unrestricted static method calls.

- **Severity:** High 8.0 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Oct 2022
- **Updated:** 21 Apr 2025
- **Also known as:** CLEANSTART-2026-VM57227, DEBIAN-CVE-2022-41853, DLA-3234-1, DSA-5313-1, GHSA-77xx-rxvh-q682, OESA-2023-1924, OESA-2023-1944, RHSA-2022:8559, RHSA-2022:8560, SUSE-SU-2022:3823-1, SUSE-SU-2022:3864-1, UBUNTU-CVE-2022-41853, openSUSE-SU-2024:12450-1

## What is CVE-2022-41853?

CVE-2022-41853 is a high-severity code injection vulnerability in Debian Debian Linux, published on 6 Oct 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Those using java.sql.Statement or java.sql.PreparedStatement in hsqldb (HyperSQL DataBase) to process untrusted input may be vulnerable to a remote code execution attack. By default it is allowed to call any static method of any Java class in the classpath resulting in code execution. The issue can be prevented by updating to 2.7.1 or by setting the system property "hsqldb.method_class_names" to classes which are allowed to be called. For example, System.setProperty("hsqldb.method_class_names", "abc") or Java argument -Dhsqldb.method_class_names="abc" can be used. From version 2.7.1 all classes by default are not accessible except those in java.lang.Math and need to be manually enabled.

Weakness: CWE-470 (Use of Externally-Controlled Input to Select Classes or Code)

## Which versions are affected by CVE-2022-41853?

2 open source packages ship an affected version, including org.hsqldb:hsqldb. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.hsqldb:hsqldb` | Maven | All versions | 2.7.1 |
| `org.hsqldb:hsqldb` | Maven | All versions | 2.7.1 |
| `hsqldb` | Red Hat:enterprise_linux:7::client | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-demo` | Red Hat:enterprise_linux:7::client | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-javadoc` | Red Hat:enterprise_linux:7::client | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-manual` | Red Hat:enterprise_linux:7::client | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb` | Red Hat:enterprise_linux:7::computenode | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-demo` | Red Hat:enterprise_linux:7::computenode | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-javadoc` | Red Hat:enterprise_linux:7::computenode | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-manual` | Red Hat:enterprise_linux:7::computenode | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb` | Red Hat:enterprise_linux:7::server | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-demo` | Red Hat:enterprise_linux:7::server | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-javadoc` | Red Hat:enterprise_linux:7::server | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-manual` | Red Hat:enterprise_linux:7::server | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb` | Red Hat:enterprise_linux:7::workstation | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-demo` | Red Hat:enterprise_linux:7::workstation | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-javadoc` | Red Hat:enterprise_linux:7::workstation | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb-manual` | Red Hat:enterprise_linux:7::workstation | All versions | 1:1.8.1.3-15.el7_9 |
| `hsqldb` | Red Hat:rhel_els:6 | All versions | 1:1.8.0.10-13.el6_10 |
| `hsqldb-demo` | Red Hat:rhel_els:6 | All versions | 1:1.8.0.10-13.el6_10 |
| `hsqldb-javadoc` | Red Hat:rhel_els:6 | All versions | 1:1.8.0.10-13.el6_10 |
| `hsqldb-manual` | Red Hat:rhel_els:6 | All versions | 1:1.8.0.10-13.el6_10 |
| `hsqldb` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 2.2.9-5.3.1 |
| `hsqldb` | openSUSE:Leap 15.3 | All versions | 2.3.3-150000.7.3.1 |
| `hsqldb` | openSUSE:Leap 15.4 | All versions | 2.3.3-150000.7.3.1 |

Products: Debian Debian Linux, Hsqldb Hypersql Database.

## How do I fix CVE-2022-41853?

Upgrade org.hsqldb:hsqldb to 2.7.1 or later.

## Is CVE-2022-41853 being exploited?

There is no known exploitation of CVE-2022-41853 in the wild and no public exploit code.

Public exploit code:

- Research into CVE-2022-41853: Using static functions to obtian RCE via Java Deserialization & Remote Codebase Attack (github_poc): https://github.com/mbadanoiu/CVE-2022-41853

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-41853 and fix it if it is affected.

What it is: CVE-2022-41853 is a high-severity code injection vulnerability in Debian Debian Linux, published on 6 Oct 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-41853 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.hsqldb:hsqldb (Maven): affected all versions; fixed in 2.7.1
- org.hsqldb:hsqldb (Maven): affected all versions; fixed in 2.7.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-41853/ (Markdown: https://insights.sbomify.com/CVE-2022-41853/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-41853
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-41853
- OSV: https://osv.dev/vulnerability/CVE-2022-41853

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-41853/
Summaries are generated and may contain mistakes; the official description above is the record.
