{"id":"CVE-2022-21126","published":"2022-11-29T16:50:19Z","modified":"2025-04-24T18:34:51Z","title":"Creation of Temporary File in Directory with Insecure Permissions","vendor":null,"product":null,"tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00919,"percentile":0.58478,"provenance":"source"},"cwes":[],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JAVA-COMGITHUBSAMTOOLS-3149901","tags":[]},{"url":"https://github.com/samtools/htsjdk/commit/4a4024a97ee3e87096df6ad9b22c8260bd527772","tags":[]},{"url":"https://github.com/samtools/htsjdk/pull/1617","tags":[]}],"priority":{"score":16.8,"factors":[{"name":"EPSS percentile","points":11.7},{"name":"CVSS severity","points":5.11}]},"affectedVersions":[{"vendor":"n/a","product":"com.github.samtools:htsjdk","versions":[">= unspecified, < 3.0.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-24T18:34:30.813161Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"com.github.samtools:htsjdk","vulnerableRanges":["<3.0.1"],"patched":["3.0.1"],"from":["GHSA-96vh-4rfp-c42c"],"provenance":"source"}],"summary":{"text":"The flaw is in the createTempDir() function in util/IOUtil.java of the com.github.samtools:htsjdk package, affecting versions before 3.0.1, where the function does not check whether the temporary directory already exists before creating it, leading to creation of a temporary file in a directory with insecure permissions. An attacker with network access and no authentication or user interaction can exploit this, with the local system's configuration and timing determining whether a pre-existing or attacker-controlled directory is used.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:20:54Z"},"euvd":{"id":"EUVD-2022-7293","exploited":false,"provenance":"source"}}