OHIF Viewers XSS in DICOM PDF extension
OHIF Viewers
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @ohif/extension-dicom-pdf npm |
|
|
OHIF Viewers
| Product | Affected | Fixed in |
|---|---|---|
| @ohif/extension-dicom-pdf npm |
|
|
OHIF Viewers is a zero-footprint DICOM viewer with shared extension packages. From 3.5.0-beta.0 until 3.12.15, 3.13.7, and 3.14.0-beta.19, the dicom-pdf extension reads the attacker-controlled MIMETypeOfEncapsulatedDocument value in extensions/dicom-pdf/src/getSopClassHandlerModule.js and uses it as the Blob media type for the attacker-controlled EncapsulatedDocument bytes. When a victim opens Encapsulated PDF SOP Class 1.2.840.10008.5.1.4.1.1.104.1, extensions/dicom-pdf/src/viewports/OHIFCornerstonePdfViewport.tsx embeds the Blob URL in an object element. A Blob labeled as HTML is handled as HTML despite the application/pdf object hint, and the Blob inherits the OHIF origin, allowing embedded script to access session storage, authentication tokens, and same-origin PACS requests. The malicious DICOM object may be opened locally, uploaded to a shared PACS, or supplied by a DICOMweb source. This issue is fixed in source versions 3.12.15, 3.13.7, and 3.14.0-beta.19.
From the CVE record · GitHub_M
The dicom-pdf extension trusts the MIME type supplied in a DICOM object and can render attacker-controlled content as HTML under the OHIF origin. If a user opens a malicious Encapsulated PDF DICOM object—locally, from a shared PACS, or through DICOMweb—embedded script can access session storage, authentication tokens, and same-origin PACS requests.
Teams running OHIF Viewers with npm @ohif/extension-dicom-pdf versions >=3.5.0-beta.0 <3.12.18, >=3.13.0-beta.0 <3.13.10, or >=3.14.0-beta.0 <3.14.0-beta.36 should check their installations.