5.9medium
No security checking for UnsafeAccess.getInstance() in UnsafeAccessor
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.22% (higher than 69% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-cr6p-23cf-w9g9
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Karlatemp UnsafeAccessor | >= 1.4.0, < 1.7.0 | CVE List |
| io.github.karlatemp:unsafe-accessor (Maven) | from 1.4.0 before 1.7.0 | GitHub Advisory Database |
| unsafe_accessor_project unsafe_accessor | from 1.4.0 before 1.7.0 | NVD |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Overview
Affected versions have no limit to using unsafe-accessor. Can be ignored if SecurityCheck.AccessLimiter not setup
Details
If UA was loaded as a named module, the internal data of UA will be protected by JVM and others can only access UA via UA's standard api.
Main application can setup SecurityCheck.AccessLimiter for UA to limit accesses to UA.
Untrusted code can access UA without lmitation in affected versions even UA was loaded as a named module.
References
NVD (es)
UnsafeAccessor (UA) es un puente para acceder a jdk.internal.misc.Unsafe y sun.misc.Unsafe. Normalmente, si UA es cargado como un módulo con nombre, los datos internos de UA están protegidos por la JVM y otros sólo pueden acceder a UA por medio de la API estándar de UA. La aplicación principal puede configurar "SecurityCheck.AccessLimiter" para UA para limitar el acceso a UA. A partir de la versión 1.4.0 y versiones anteriores a 1.7.0, cuando es configurado "SecurityCheck.AccessLimiter", el código que no es confiable puede acceder a la UA sin limitaciones, incluso cuando la UA es cargado como un módulo con nombre. Este problema no afecta a aquellos para los que no ha sido configurado "SecurityCheck.AccessLimiter". La versión 1.7.0 contiene un parche
References
| https://github.com/Karlatemp/UnsafeAccessor/security/advisories/GHSA-cr6p-23cf-w9g9 | patch, third-party-advisory, web | |
| https://github.com/Karlatemp/UnsafeAccessor/commit/4ef83000184e8f13239a1ea2847ee401d81585fd | patch, third-party-advisory, web | |
| https://github.com/Karlatemp/UnsafeAccessor/releases/tag/1.7.0 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31139 | advisory | |
| https://github.com/Karlatemp/UnsafeAccessor | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31139 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cr6p-23cf-w9g9 changed 2024-02-16 | CC-BY-4.0 |
| NVD | CVE-2022-31139 changed 2026-06-17 | Public domain |