# Ubuntu patches HyperSQL flaw that let SQL statements call arbitrary Java static methods

> **Key takeaway:** HyperSQL's default permission to invoke any static method on the classpath is now restricted to java.lang.Math, closing a remote code execution path for applications that feed untrusted input into SQL statements.

**Published:** 2026-12-01T12:49:05+00:00 
**Source:** Ubuntu Security & Release Notices 
**Category:** distro-news 
**Canonical URL:** https://fosswire.org/news/ubuntu-patches-hypersql-flaw-that-let-sql-statements-call-ar 

## Summary
Ubuntu has published USN-9298-1 for the HyperSQL Java SQL database engine, addressing CVE-2022-41853. The flaw is that HyperSQL permitted SQL statements to call any static method of any Java class present on the classpath by default. If an application passed untrusted input into HyperSQL statements, an attacker could leverage that capability to execute arbitrary code. The update changes the default so that only methods of java.lang.Math can be invoked; any other class must be explicitly listed in the hsqldb.method_class_names system property.

The advisory covers Ubuntu 22.04 LTS, 20.04 LTS, 18.04 LTS and 16.04 LTS, with fixed libhsqldb-java packages delivered through Ubuntu Pro's ESM Apps channel. The listed versions are 2.6.1-1ubuntu0.1~esm1 for jammy, 2.5.0-1ubuntu0.1~esm1 for focal, 2.4.1-2~18.04.1~esm1 for bionic and 2.3.3+dfsg2-1ubuntu0.1~esm1 for xenial. A standard system update applies the changes, though administrators should verify that any application relying on custom static method calls adds those classes to the allowlist property.

## How the HyperSQL method-call restriction works
- **Defect class:** HyperSQL's SQL engine allowed statements to invoke static methods of arbitrary Java classes on the classpath by default, turning SQL input into a Java method invocation primitive.
- **Attack vector:** The issue is exploitable when an application passes untrusted input into HyperSQL statements; the advisory describes possible arbitrary code execution rather than a local-only or unauthenticated network vector.
- **Mitigation behavior:** After the update, only java.lang.Math methods are callable by default, and any additional classes must be named in the hsqldb.method_class_names system property.
- **Affected releases and packages:** libhsqldb-java is fixed for Ubuntu 22.04 LTS (2.6.1-1ubuntu0.1~esm1), 20.04 LTS (2.5.0-1ubuntu0.1~esm1), 18.04 LTS (2.4.1-2~18.04.1~esm1) and 16.04 LTS (2.3.3+dfsg2-1ubuntu0.1~esm1), all via Ubuntu Pro ESM Apps.
- **CVE identifier:** The advisory references CVE-2022-41853, indicating the underlying issue predates this Ubuntu erratum and is now being backported to older LTS branches.

## Why it matters
HyperSQL is embedded in many Java applications and build tools, so the default allowlist change can break deployments that legitimately call custom static methods from SQL. Administrators on older Ubuntu LTS releases must use Ubuntu Pro ESM Apps to receive the fix, since the advisory notes a community fix might only appear later. The update also reinforces the broader lesson that SQL engines exposing host-language function calls need restrictive defaults rather than opt-in hardening.