Skip to main content

CVE-2022-31139: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in Karlatemp UnsafeAccessor

Medium
Published: Mon Jul 11 2022 (07/11/2022, 18:25:11 UTC)
Source: CVE
Vendor/Project: Karlatemp
Product: UnsafeAccessor

Description

UnsafeAccessor (UA) is a bridge to access jdk.internal.misc.Unsafe & sun.misc.Unsafe. Normally, if UA is loaded as a named module, the internal data of UA is protected by JVM and others can only access UA via UA's standard API. The main application can set up `SecurityCheck.AccessLimiter` for UA to limit access to UA. Starting with version 1.4.0 and prior to version 1.7.0, when `SecurityCheck.AccessLimiter` is set up, untrusted code can access UA without limitation, even when UA is loaded as a named module. This issue does not affect those for whom `SecurityCheck.AccessLimiter` is not set up. Version 1.7.0 contains a patch.

AI-Powered Analysis

AILast updated: 06/23/2025, 02:50:53 UTC

Technical Analysis

CVE-2022-31139 is a vulnerability in the Karlatemp UnsafeAccessor (UA) library, which serves as a bridge to access the internal Java classes jdk.internal.misc.Unsafe and sun.misc.Unsafe. These internal classes provide low-level operations that are typically restricted due to their potential to bypass Java's security model. UnsafeAccessor is designed to be loaded as a named Java module, which normally ensures that its internal data is protected by the Java Virtual Machine (JVM). Access to UnsafeAccessor is intended to be controlled via its standard API, and the main application can enforce access restrictions by configuring a SecurityCheck.AccessLimiter. However, in versions 1.4.0 through 1.6.x (prior to 1.7.0), when SecurityCheck.AccessLimiter is configured, untrusted code can bypass these restrictions and gain unrestricted access to UnsafeAccessor. This means that untrusted or malicious code can directly interact with UnsafeAccessor's internal data and potentially leverage Unsafe's capabilities without limitation. The vulnerability does not affect deployments where SecurityCheck.AccessLimiter is not set up. The issue was addressed and patched in version 1.7.0 of UnsafeAccessor. No known exploits in the wild have been reported to date. The vulnerability is classified under CWE-200, indicating exposure of sensitive information to unauthorized actors. The technical root cause is an improper enforcement of access controls when the AccessLimiter is configured, allowing privilege escalation within the JVM environment through UnsafeAccessor.

Potential Impact

For European organizations using Java applications that depend on Karlatemp UnsafeAccessor versions 1.4.0 to 1.6.x with SecurityCheck.AccessLimiter configured, this vulnerability poses a risk of unauthorized access to sensitive internal JVM data. Attackers exploiting this flaw could bypass Java security mechanisms, potentially leading to exposure of confidential information, unauthorized memory access, or manipulation of application behavior. This could undermine the confidentiality and integrity of critical business applications, especially those handling sensitive personal data, financial information, or intellectual property. Given the widespread use of Java in enterprise environments across Europe, including sectors such as finance, healthcare, and government, exploitation could facilitate lateral movement within networks or enable further attacks. However, the vulnerability requires that the application uses UnsafeAccessor with AccessLimiter configured, which may limit the attack surface. The absence of known exploits suggests limited active targeting so far, but the potential for abuse remains significant. The impact on availability is likely low, as the vulnerability primarily concerns unauthorized information exposure and access control bypass rather than denial-of-service conditions.

Mitigation Recommendations

Upgrade UnsafeAccessor to version 1.7.0 or later, which contains the official patch addressing this vulnerability. If upgrading is not immediately feasible, review and disable the use of SecurityCheck.AccessLimiter in UnsafeAccessor configurations, as the vulnerability only manifests when this limiter is set up. Conduct a thorough audit of Java applications to identify usage of UnsafeAccessor, especially versions between 1.4.0 and 1.6.x, and verify whether AccessLimiter is enabled. Implement strict code signing and integrity verification for Java modules to prevent loading of untrusted or tampered UnsafeAccessor versions. Apply runtime monitoring to detect unusual or unauthorized access patterns to UnsafeAccessor APIs, which may indicate exploitation attempts. Restrict execution privileges and sandbox untrusted code to minimize the risk of exploitation even if UnsafeAccessor access controls are bypassed. Engage in regular dependency management and vulnerability scanning to promptly identify and remediate vulnerable library versions. Coordinate with development teams to ensure secure coding practices when interacting with low-level JVM internals and avoid unnecessary exposure of Unsafe APIs.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-05-18T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf371a

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/23/2025, 2:50:53 AM

Last updated: 8/17/2025, 3:44:39 AM

Views: 9

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats