CVE-2024-13942: Software Security Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-xpxw-ff9m-vh66
CVSS 7.6
CWE-367
Published
Advisory Summary

CVE-2024-13942 is a HIGH (CVSS 7.6) security vulnerability vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Software libraries in the Maven ecosystem. The weakness occurs when the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.. Remediation is available in the latest vendor maintenance releases.

CVE-2024-13942 at a Glance

CVE Identifier CVE-2024-13942
GHSA Identifier GHSA-xpxw-ff9m-vh66
Severity HIGH
CVSS v3.1 Base Score 7.6
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Software
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Physical (AV:P)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-13942

To remediate this vulnerability, upgrade all affected Software dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-13942, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree

Analyze the terminal output to locate any version of Software in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Software, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Secure BootROM of RK3588s SoC is vulnerable to a time-of-check to time-of-use attack in case of booting from external media (SPI NOR or NAND, EMMC or SD). The code reads the header of the next-stage loader twice. The header contains hashes of the executable modules and is signed with a private key, the public part of which is verified against the SHA256 digest blown in the OTP. The first read is only partial and contains only the hashes of the executable modules. The second is complete, including the header signature. Although the header is verified based on the fully read data, the authenticity of the executable modules is checked against the partial data from the first read. An attacker with physical access to a device containing RK3588s SoC can easily modify the next-stage loader data on-the-fly using a low-cost SD-card or SPI NOR/NAND or EMMC emulator. Even a simple ultra low-cost circuit comprising two memory chips (containing the same data but different headers - the original and the modified one) and a multiplexer can be used to carry out an attack. This can lead to arbitrary code execution with the highest privileges available (EL3). This issue affects RK3588s: RK3588s SoC BootROM (secure) 350B20210512V100 and possibly others. As remediation apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable https://www.rock-chips.com/a/en/products/RK35_Series/2022/0926/1660.html

References

Frequently Asked Questions

What is CVE-2024-13942?
CVE-2024-13942 is a security vulnerability in Software classified as a security vulnerability vulnerability under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Software versions are affected?
Affected versions include releases prior to current release patches.
What version fixes CVE-2024-13942?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
What is the CVSS score of CVE-2024-13942?
CVE-2024-13942 has a CVSS v3.1 base score of 7.6 (HIGH) with vector string CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-13942?
CVE-2024-13942 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check Maven dependencies for CVE-2024-13942?
Run the dependency tree command: 'mvn dependency:tree'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xpxw-ff9m-vh66",
  "modified" : "2026-08-19T18:32:47Z",
  "published" : "2026-08-19T18:32:47Z",
  "aliases" : [ "CVE-2024-13942" ],
  "details" : "Secure BootROM of RK3588s SoC is vulnerable to a time-of-check to time-of-use attack in case of booting from external media (SPI NOR or NAND, EMMC or SD).\n\n\n\n\nThe code reads the header of the next-stage loader twice. The header contains hashes of the executable modules and is signed with a private key, the public part of which is verified against the SHA256 digest blown in the OTP.\n\n\n\n\nThe first read is only partial and contains only the hashes of the executable modules. The second is complete, including the header signature.\n\nAlthough the header is verified based on the fully read data, the authenticity of the executable modules is checked against the partial data from the first read.\n\n\n\n\nAn attacker with physical access to a device containing RK3588s SoC can easily modify the next-stage loader data on-the-fly using a low-cost SD-card or SPI NOR/NAND or EMMC emulator. Even a simple ultra low-cost circuit comprising two memory chips (containing the same data but different headers - the original and the modified one) and a multiplexer can be used to carry out an attack.\n\n\n\n\nThis can lead to arbitrary code execution with the highest privileges available (EL3). This issue affects RK3588s: RK3588s SoC BootROM (secure) 350B20210512V100 and possibly others.\nAs remediation apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable  https://www.rock-chips.com/a/en/products/RK35_Series/2022/0926/1660.html",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-13942"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/klsecservices/Advisories/blob/master/KLSA-00230-Rockchip-RK3588s-Secure-BootROM-TOCTOU-vulnerability.md"
  }, {
    "type" : "WEB",
    "url" : "https://www.rock-chips.com/a/en/products/RK35_Series/2022/0926/1660.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.rock-chips.com/a/en/psirt/vdp.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367" ],
    "severity" : "HIGH",
    "github_reviewed" : false,
    "github_reviewed_at" : null,
    "nvd_published_at" : "2026-08-19T17:18:21Z"
  }
}