What’s Vulnerable › Vulnerabilities
CVE-2022-21126: Creation of Temporary File in Directory with Insecure Permissions
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-11-29 · updated 2026-06-17
- Weakness: CWE-668
Description
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.
Affected products
- com.github.samtools:htsjdk: before 3.0.1 — fixed in 3.0.1
How to fix
Upgrade to a fixed version: com.github.samtools:htsjdk 3.0.1. Check the vendor advisory for mitigations.
References
- https://github.com/samtools/htsjdk/commit/4a4024a97ee3e87096df6ad9b22c8260bd527772
- https://github.com/samtools/htsjdk/pull/1617
- https://security.snyk.io/vuln/SNYK-JAVA-COMGITHUBSAMTOOLS-3149901
- https://github.com/samtools/htsjdk/commit/4a4024a97ee3e87096df6ad9b22c8260bd527772
- https://github.com/samtools/htsjdk/pull/1617
- https://security.snyk.io/vuln/SNYK-JAVA-COMGITHUBSAMTOOLS-3149901
Get alerted when CVE-2022-21126 or the next vulnerability affects your stack