DSA-5313: -1 hsqldb -- security update
hsqldb - security update
Other sources
It was found that those using java.sql.Statement or java.sql.PreparedStatement in hsqldb, a Java SQL 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.5.1-1+deb11u1 or by setting the system property hsqldb.methodclassnames to classes which are allowed to be called. For example, System.setProperty("hsqldb.methodclassnames","abc") or Java argument -Dhsqldb.methodclassnames="abc" can be used. From version 2.5.1-1+deb11u1 all classes by default are not accessible except those in java.lang.Math and need to be manually enabled.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/hsqldbto a version that resolves this vulnerability.Fixed in 2.5.1-1+deb11u1 - Upgrade
Upgrade
hsqldbto a version that resolves this vulnerability.Fixed in 2.5.1-1+deb11u1Patch DSA-5313-1 - Configuration
Set the system property hsqldb.method_class_names to the classes allowed to be called; for example, use -Dhsqldb.method_class_names="abc" or System.setProperty("hsqldb.method_class_names","abc").
hsqldb hsqldb.method_class_names = classes which are allowed to be called
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using HSQLDB that pass untrusted input to java.sql.Statement or java.sql.PreparedStatement are exposed. In the affected behavior, an attacker may be able to invoke static methods from Java classes on the application's classpath.
Is the default configuration affected?
Yes. Before the corrected behavior, HSQLDB allowed calls to any static method of any Java class in the classpath by default. This can result in remote code execution when untrusted input is processed through Statement or PreparedStatement.
What can be done if the package cannot be updated immediately?
Restrict callable classes by setting the hsqldb.method_class_names system property to an explicit allowlist. For example, set System.setProperty("hsqldb.method_class_names","abc") or start Java with -Dhsqldb.method_class_names="abc".
What changes after updating?
Version 2.5.1-1+deb11u1 denies access to all classes by default except classes in java.lang.Math. Any additional classes that need to be callable must be manually enabled.