Every CVE Search/ Get API key

CVE-2022-21126

Creation of Temporary File in Directory with Insecure Permissions

7.3 HighFix available

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.75%Down 0.2 points since Nov 30, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.3

Creation of Temporary File in Directory with Insecure Permissions

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
CVE-2022-21126
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
EUVDEUVD-2022-7293 7.3

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
EUVD-2022-7293
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-96vh-4rfp-c42c 7.8

HTSJDK is vulnerable to exposure of resource(s) to the wrong sphere

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
GHSA-96vh-4rfp-c42c
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-668
Updated
2026-11-02
NVD 7.3

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
CVE-2022-21126
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-668
Updated
2026-11-02
OSV 7.3

Creation of Temporary File in Directory with Insecure Permissions

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
CVE-2022-21126
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVGHSA-96vh-4rfp-c42c 7.8

HTSJDK is vulnerable to exposure of resource(s) to the wrong sphere

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
GHSA-96vh-4rfp-c42c
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-668
Updated
2026-11-02
OSVUBUNTU-CVE-2022-21126 7.3

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the createTempDir() function in util/IOUtil.java not checking for the existence of the temporary directory before attempting to create it.

Record
UBUNTU-CVE-2022-21126
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
com.github.samtools:htsjdk
Maven
before 3.0.1
3.0.1
com.github.samtools:htsjdk
Maven
before 3.0.1, plus listed versions
1.1281.1291.1301.1311.132
Show 45 moreShow less
1.1331.1341.1351.1361.1371.1381.1391.1401.1411.1421.1432.0.02.0.12.1.02.1.12.10.02.10.12.11.02.12.02.13.02.13.12.13.22.14.02.14.12.14.22.14.32.15.02.15.12.16.02.16.12.17.02.18.02.18.12.18.22.19.02.2.02.2.12.2.22.2.32.2.42.20.02.20.12.20.22.20.32.21.0
3.0.1
htsjdk
Ubuntu:16.04:LTS
All versions, plus listed versions
2.0.1+dfsg.1-1
None known
htsjdk
Ubuntu:18.04:LTS
All versions, plus listed versions
2.8.1+dfsg-12.8.1+dfsg-2
None known
htsjdk
Ubuntu:20.04:LTS
All versions, plus listed versions
2.18.2+dfsg-2
None known
htsjdk
Ubuntu:22.04:LTS
All versions, plus listed versions
2.23.0+dfsg-22.24.1+dfsg-1
None known
htsjdk
Ubuntu:24.04:LTS
All versions, plus listed versions
3.0.5+dfsg-13.0.5+dfsg-24.0.2+dfsg-24.1.0+dfsg-1
None known
htsjdk
Ubuntu:25.10
All versions, plus listed versions
4.1.3+dfsg-2
None known
htsjdk
Ubuntu:26.10
All versions, plus listed versions
4.3.0+dfsg-15.0.0+dfsg-1
None known
htsjdk
Ubuntu:26.04:LTS
All versions, plus listed versions
4.1.3+dfsg-24.3.0+dfsg-1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-21126 is a high vulnerability (CVSS 7.3) in Samtools Htsjdk, published November 29, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.75%, the 55th percentile. Fixed in com.github.samtools:htsjdk 3.0.1.

References

This page doesn't list everything

Left out here: 20 versions. The JSON record has them.

MoveEnter Open