CyberSecBulletin
CVE-2022-21126NVD status: Modified

com.github.samtools:htsjdk: Exposure of Resource to Wrong Sphere

CVE-2022-21126 is a high-severity exposure of resource to wrong sphere vulnerability in com.github.samtools:htsjdk, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists version 3.0.1 as the first without the flaw, so updating com.github.samtools:htsjdk to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.75% chance of exploitation within 30 days, higher than 56% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update com.github.samtools:htsjdk to 3.0.1 or a later version.
  2. Update Htsjdk to 3.0.1 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
Com.github.samtools:htsjdkcom.github.samtools:htsjdkbefore 3.0.13.0.1
SamtoolsHtsjdkbefore 3.0.13.0.1

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.3HighCNA (snyk.io)
CVSS 3.17.8HighNVD

Official 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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Exposure of Resource to Wrong Sphere

The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.

More Exposure of Resource to Wrong Sphere vulnerabilities (CWE-668)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Third-party and government advisories

Recent Exposure of Resource to Wrong Sphere vulnerabilities

Spotted an error? Tell us.