{"id":"CVE-2022-21126","aliases":["CVE-2022-21126","GHSA-96vh-4rfp-c42c"],"related":[],"kind":"vulnerability","state":"published","title":"Creation of Temporary File in Directory with Insecure Permissions","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"El paquete com.github.samtools:htsjdk anterior a 3.0.1 es vulnerable a la creación de un archivo temporal en un directorio con permisos inseguros debido a que la función createTempDir() en util/IOUtil.java no verifica la existencia del directorio temporal antes de intentar crearlo.","source":"nvd"}],"published":"2022-11-29T16:50:19.233Z","modified":"2026-06-17T04:25:34.340Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-668"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"3.0.1","status":"affected"}],"product":"com.github.samtools:htsjdk","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.0.1"}],"ecosystem":"Maven","package":"com.github.samtools:htsjdk","purl":"pkg:maven/com.github.samtools/htsjdk","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.0.1"}],"vendor":"samtools","product":"htsjdk","cpe":"cpe:2.3:a:samtools:htsjdk:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JAVA-COMGITHUBSAMTOOLS-3149901","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/samtools/htsjdk/commit/4a4024a97ee3e87096df6ad9b22c8260bd527772","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/samtools/htsjdk/pull/1617","tags":["exploit","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21126","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/samtools/htsjdk","tags":["package"],"sources":["ghsa"]}],"credits":["Jonathan Leitschuh"],"assigner":"snyk","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-04-24T18:34:30.813Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-21126","url":"https://www.cve.org/CVERecord?id=CVE-2022-21126","licence":"CVE Terms of Use","modified":"2025-04-24T18:34:51.291Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-96vh-4rfp-c42c","url":"https://github.com/advisories/GHSA-96vh-4rfp-c42c","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:04.039Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-21126","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21126","licence":"Public domain","modified":"2026-06-17T04:25:34.340Z"}],"updatedAt":"2026-11-25T22:58:17.114Z","epss":{"score":0.00867,"percentile":0.59801,"date":"2026-12-01T12:00:22.000Z"}}