{"id":"UBUNTU-CVE-2022-21126","details":"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.","modified":"2026-05-20T16:03:59.194730083Z","published":"2022-11-29T17:15:00Z","upstream":["CVE-2022-21126"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-21126"},{"type":"REPORT","url":"https://github.com/samtools/htsjdk/pull/1617"},{"type":"REPORT","url":"https://github.com/samtools/htsjdk/commit/4a4024a97ee3e87096df6ad9b22c8260bd527772"},{"type":"REPORT","url":"https://security.snyk.io/vuln/SNYK-JAVA-COMGITHUBSAMTOOLS-3149901"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-21126"}],"affected":[{"package":{"name":"htsjdk","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.1+dfsg.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libhtsjdk-java","binary_version":"2.0.1+dfsg.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.1+dfsg-1","2.8.1+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_name":"libhtsjdk-java","binary_version":"2.8.1+dfsg-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.18.2+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.18.2+dfsg-2","binary_name":"libhtsjdk-java"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.23.0+dfsg-2","2.24.1+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libhtsjdk-java","binary_version":"2.24.1+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.5+dfsg-1","3.0.5+dfsg-2","4.0.2+dfsg-2","4.1.0+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libhtsjdk-java","binary_version":"4.1.0+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.1.3+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_version":"4.1.3+dfsg-2","binary_name":"libhtsjdk-java"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}},{"package":{"name":"htsjdk","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/htsjdk?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.1.3+dfsg-2","4.3.0+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_version":"4.3.0+dfsg-1","binary_name":"libhtsjdk-java"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-21126.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}