CVE-2022-21126: HTSJDK is vulnerable to exposure of resource(s) to the wrong sphere
7.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.14862%
CWE
Published
11/29/2022
Updated
1/28/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| com.github.samtools:htsjdk | maven | < 3.0.1 | 3.0.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the insecure implementation of createTempDir() in IOUtil.java, which used File.createTempFile() followed by deletion and directory creation. This approach is vulnerable to TOCTOU attacks and insecure permissions. The commit diff shows this function was deprecated and replaced with Files.createTempDirectory(), which securely handles directory creation. The CVE description and patch notes explicitly identify this function as the root cause.