Bug 1204521 - (CVE-2022-41853) VUL-0: CVE-2022-41853: hsqldb: Untrusted input may lead to RCE attack
(CVE-2022-41853)
VUL-0: CVE-2022-41853: hsqldb: Untrusted input may lead to RCE attack
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Major
: ---
Assigned To: Security Team bot
E-mail List
https://smash.suse.de/issue/344369/
CVSSv3.1:SUSE:CVE-2022-41853:8.0:(AV:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-20 06:55 UTC by Stoyan Manolov
Modified: 2022-11-23 15:33 UTC (History)
8 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stoyan Manolov 2022-10-20 06:55:53 UTC
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.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50212#c7

References:
https://bugzilla.redhat.com/show_bug.cgi?id=2136141
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-41853
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50212#c7
https://www.cve.org/CVERecord?id=CVE-2022-41853
http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html#src_jrt_access_control
Comment 4 David Anes 2022-10-24 13:34:44 UTC
Also affects Factory. Next release (2.7.1) will be released by upstream in ~2 weeks.

Current mitigation (as per https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50212#c14):

> This and other deployment security issues have been covered in the 
> documentation. See http://hsqldb.org/doc/2.0/guide/management-
> chapt.html#mtc_database_security for the recommendations. I think deployments > that process random queries provided by users are a minority and those 
> deployments can easily prevent the issue by setting the system property. For
> example 
> 
> System.setProperty("hsqldb.method_class_names", "abc");
> 
> or
> 
> Java -Dhsqldb.method_class_names="abc"
> 
> The above information should be published together with the disclosure. It is > a lot easier to add the property to a deployment than to update the jar, which > will be released in a few months time.
Comment 5 David Anes 2022-10-24 13:38:07 UTC
Fixed link to HSQLDB docs referenced before:
* http://www.hsqldb.org/doc/guide/management-chapt.html#mtc_database_security
Comment 9 David Anes 2022-10-25 12:04:42 UTC
All done. Sent back to security for review.
Comment 10 Swamp Workflow Management 2022-11-01 14:19:36 UTC
SUSE-SU-2022:3823-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1204521
CVE References: CVE-2022-41853
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    hsqldb-2.3.3-150000.7.3.1
openSUSE Leap 15.3 (src):    hsqldb-2.3.3-150000.7.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2022-11-03 14:19:11 UTC
SUSE-SU-2022:3864-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1204521
CVE References: CVE-2022-41853
JIRA References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP5 (src):    hsqldb-2.2.9-5.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.