/

CVE-2026-46350

Severity:

CRITICAL RISK

(9.1)

Improper Input Validation (CWE-20) in dcmjs DICOM Values

CVE-2026-46350

Received

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20, CWE-1284

Impact:

Incorrect calculations and processing disruption

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

In affected dcmjs versions, DecimalString and IntegerString values may be converted to JavaScript numbers without fully validating that they follow DICOM rules or produce finite values. When applications process untrusted DICOM data, invalid numbers such as Infinity or NaN, or out-of-range integers, could corrupt calculations or disrupt processing.

In affected dcmjs versions, DecimalString and IntegerString values may be converted to JavaScript numbers without fully validating that they follow DICOM rules or produce finite values. When applications process untrusted DICOM data, invalid numbers such as Infinity or NaN, or out-of-range integers, could corrupt calculations or disrupt processing.

Affected context

The issue occurs in dcmjs parsing of DICOM DecimalString (DS) and IntegerString (IS) values. Before version 0.52.0, the parsing logic used permissive text sanitization followed by JavaScript number conversion without checking finiteness or enforcing all relevant value-representation constraints. Risk depends on whether an application processes untrusted or malformed DICOM data and relies on the parsed values.

The issue occurs in dcmjs parsing of DICOM DecimalString (DS) and IntegerString (IS) values. Before version 0.52.0, the parsing logic used permissive text sanitization followed by JavaScript number conversion without checking finiteness or enforcing all relevant value-representation constraints. Risk depends on whether an application processes untrusted or malformed DICOM data and relies on the parsed values.

Exploit preconditions

  • Attack surface: An application parses DICOM data using the affected DS or IS implementations.
  • Required access: An attacker needs a way to provide or influence the DICOM input; direct access to the application is not implied.
  • Trigger point: Parsing a DS or IS field containing a value that overflows, converts to NaN, or violates the applicable DICOM constraints.
  • Why exploitation is possible: The parser converts permissively sanitized text to a JavaScript number without validating finiteness and the full DS or IS rules.
  • Attack surface: An application parses DICOM data using the affected DS or IS implementations.
  • Required access: An attacker needs a way to provide or influence the DICOM input; direct access to the application is not implied.
  • Trigger point: Parsing a DS or IS field containing a value that overflows, converts to NaN, or violates the applicable DICOM constraints.
  • Why exploitation is possible: The parser converts permissively sanitized text to a JavaScript number without validating finiteness and the full DS or IS rules.

Why this happens

The parser treats syntactically permissive text as a valid numeric value without checking the result or enforcing the constraints of the DICOM value representation. JavaScript number conversion can produce Infinity or NaN, and IS parsing can accept exponent notation or values outside the signed 32-bit range. This is an input-validation weakness (CWE-20) involving inadequate validation of a specified quantity (CWE-1284).

The parser treats syntactically permissive text as a valid numeric value without checking the result or enforcing the constraints of the DICOM value representation. JavaScript number conversion can produce Infinity or NaN, and IS parsing can accept exponent notation or values outside the signed 32-bit range. This is an input-validation weakness (CWE-20) involving inadequate validation of a specified quantity (CWE-1284).

Potential impact

  • Invalid values could propagate into spatial geometry, windowing, dose scaling, frame counts, rescaling, or volume reconstruction.
  • Calculations or displayed results could be incorrect.
  • Processing could be disrupted when downstream components encounter unexpected numeric values.
  • Data derived from affected values could be unreliable.
  • Invalid values could propagate into spatial geometry, windowing, dose scaling, frame counts, rescaling, or volume reconstruction.
  • Calculations or displayed results could be incorrect.
  • Processing could be disrupted when downstream components encounter unexpected numeric values.
  • Data derived from affected values could be unreliable.

General mitigation guidance

Defensive patterns include validating numeric input against the complete rules for its DICOM value representation before accepting or using it. Parsing should reject non-finite results, malformed values, and IS values outside the permitted signed 32-bit range rather than silently coercing them. Applications can also reduce trust in external DICOM data, validate values at ingestion and before sensitive calculations, handle parse failures safely, and limit the privileges and operational impact of processing components.

Defensive patterns include validating numeric input against the complete rules for its DICOM value representation before accepting or using it. Parsing should reject non-finite results, malformed values, and IS values outside the permitted signed 32-bit range rather than silently coercing them. Applications can also reduce trust in external DICOM data, validate values at ingestion and before sensitive calculations, handle parse failures safely, and limit the privileges and operational impact of processing components.

How teams detect issues like this

  • Use static analysis to locate permissive numeric sanitization followed by direct number conversion.
  • Review parser code for missing finiteness checks and missing DS/IS-specific format, length, or range validation.
  • Test parsing boundaries and malformed values, including overflow, sign-only strings, exponent notation, and out-of-range integers.
  • Apply ingestion policies that reject invalid DICOM values and monitor for parse errors or unexpected non-finite numbers.

Automated code review tools may help identify conversion paths that lack validation.

  • Use static analysis to locate permissive numeric sanitization followed by direct number conversion.
  • Review parser code for missing finiteness checks and missing DS/IS-specific format, length, or range validation.
  • Test parsing boundaries and malformed values, including overflow, sign-only strings, exponent notation, and out-of-range integers.
  • Apply ingestion policies that reject invalid DICOM values and monitor for parse errors or unexpected non-finite numbers.

Automated code review tools may help identify conversion paths that lack validation.

Sources

SourceLink
github.comgithub.com/dcmjs-org/dcmjs/commit/81e7e11cdefb56aa1a65bfe259648b865583ff88
github.comgithub.com/dcmjs-org/dcmjs/pull/497
github.comgithub.com/dcmjs-org/dcmjs/releases/tag/v0.52.0
github.comgithub.com/dcmjs-org/dcmjs/security/advisories/GHSA-px68-xx5g-48q5

Frequently asked

questions

The issue is triggered by parsing crafted DS or IS values. Remote exploitation depends on whether an application accepts attacker-controlled DICOM data through a network-facing or otherwise accessible workflow.

An attacker needs a way to supply or influence DICOM input that the affected parser processes. The vulnerability description does not establish a particular authentication requirement.

Validate each value against its DICOM representation rules before use, reject non-finite numeric results, and enforce the IS range rather than relying on permissive sanitization and conversion.

Treat external DICOM data as untrusted, validate at ingestion and at sensitive use boundaries, and test malformed and boundary values in parser security checks.

The issue is triggered by parsing crafted DS or IS values. Remote exploitation depends on whether an application accepts attacker-controlled DICOM data through a network-facing or otherwise accessible workflow.

An attacker needs a way to supply or influence DICOM input that the affected parser processes. The vulnerability description does not establish a particular authentication requirement.

Validate each value against its DICOM representation rules before use, reject non-finite numeric results, and enforce the IS range rather than relying on permissive sanitization and conversion.

Treat external DICOM data as untrusted, validate at ingestion and at sensitive use boundaries, and test malformed and boundary values in parser security checks.

Find out what's already
exploitable in your codebase.