CVE-2026-118670
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
CVE-2026-118670 is a high vulnerability (CVSS 8.8) in Ohif Viewers, published November 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.42%, the 36th percentile. Fixed in @ohif/extension-dicom-pdf 3.12.18.
- Severity
- 8.8 HighCVSS 3.1, CVE List
- Exploit chance
- 0.42%EPSS, 36th percentile
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
3.12.18@ohif/extension-dicom-pdf +2 more
Description
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- Low
Exploit likelihood
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@ohif/extension-dicom-pdfnpm | 3.5.0-beta.0 up to 3.12.18 | 3.12.18 |
@ohif/extension-dicom-pdfnpm | 3.13.0-beta.0 up to 3.13.10 | 3.13.10 |
@ohif/extension-dicom-pdfnpm | 3.14.0-beta.0 up to 3.14.0-beta.36 | 3.14.0-beta.36 |
What each source reports
CVE List Score used 8.8
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
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.
- Record
CVE-2026-118670- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Weakness
- CWE-79
- Updated
- 2026-11-06
EUVDEUVD-2026-118385 8.8
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
- Record
EUVD-2026-118385- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Updated
- 2026-11-10
GitHub AdvisoriesGHSA-xwgp-w3pj-q5h3 8.8
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
Summary
An XSS (Cross-Site Scripting) vulnerability occurs when an attacker is able to inject their own JavaScript code into a web page's source, which is subsequently processed by the victim's browser. A common cause of this vulnerability is the failure to validate user-supplied data before displaying it within the vulnerable application without proper filtering. To exploit the vulnerability, an attacker must input HTML code into a vulnerable parameter containing structures that trigger the execution of JavaScript. The DOM XSS variant occurs when user-supplied data is processed by a client-side script; if this data is not handled correctly by the script itself, it becomes possible to inject additional JavaScript commands.
Attacker model: Any actor who can get a DICOM object in front of a victim — email a .dcm
for local viewing, upload to a shared PACS, or operate/compromise a DICOMweb source.
Preconditions: Victim opens a study whose SOP Class is Encapsulated PDF
(1.2.840.10008.5.1.4.1.1.104.1) and OHIF's dicom-pdf extension renders it (default in the
standard modes).
Taint path
Source — two attacker-controlled tags on the encapsulated-document instance:
MIMETypeOfEncapsulatedDocument(0042,0012)EncapsulatedDocument(0042,0011) — the raw document bytes
extensions/dicom-pdf/src/getSopClassHandlerModule.js:15,20 reads the MIME tag with no
validation and passes it as defaultType:
const { SeriesDescription = 'PDF', MIMETypeOfEncapsulatedDocument } = instance;
...
const renderedUrlParams = {
instance,
tag: 'EncapsulatedDocument',
defaultType: MIMETypeOfEncapsulatedDocument || 'application/pdf', // attacker-controlled
singlepart: 'pdf',
};
const renderedUrl = dataSource.retrieve.directURL(renderedUrlParams);
Sink — defaultType becomes the Blob type in all three retrieval paths:
Local file (no server required): extensions/default/src/DicomLocalDataSource/index.js:120-131
directURL: params => {
const { instance, tag, defaultType } = params;
const value = instance[tag];
if (value instanceof Array && value[0] instanceof ArrayBuffer) {
return URL.createObjectURL(new Blob([value[0]], { type: defaultType })); // attacker MIME
}
},
DICOMweb InlineBinary: extensions/default/src/utils/getDirectURL.ts:40-44 →
platform/core/src/utils/b64toBlob.js:18
if (value.InlineBinary) {
const blob = utils.b64toBlob(value.InlineBinary, defaultType); // -> new Blob(..., { type: defaultType })
value.DirectRetrieveURL = URL.createObjectURL(blob);
return value.DirectRetrieveURL;
}
DICOMweb bulk data: extensions/default/src/utils/getDirectURL.ts:52-55
return value.retrieveBulkData(options).then(arr => {
value.DirectRetrieveURL = URL.createObjectURL(new Blob([arr], { type: defaultType }));
return value.DirectRetrieveURL;
});
Render — extensions/dicom-pdf/src/viewports/OHIFCornerstonePdfViewport.tsx:86-92
<object
data={url} {/* blob: URL whose stored MIME = attacker's MIMETypeOfEncapsulatedDocument */}
type="application/pdf" {/* only a hint; overridden by the blob's own Content-Type */}
className={style}
>
Why it fires. A blob: URL stores the MIME type passed at new Blob(..., { type })
construction. When such a URL is navigated/embedded, the browser uses the blob's stored
Content-Type to choose a handler; the <object type="application/pdf"> attribute is a
pre-load hint, not an override. A blob created with type: 'text/html' therefore renders as an
HTML document, and because blob: URLs inherit the creating page's origin, any <script> in it
executes in the OHIF origin — with access to localStorage/sessionStorage, auth tokens,
and same-origin requests to the PACS.
Impact
Users using the applications. If the application is behind authentication then session can be stolen. If on the same DNS name some other applications are hosted, they…
- Record
GHSA-xwgp-w3pj-q5h3- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Weakness
- CWE-79
- Updated
- 2026-11-10
NVD 8.8
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.
- Record
CVE-2026-118670- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Weakness
- CWE-79
- Updated
- 2026-11-12
OSV 8.8
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
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.
- Record
CVE-2026-118670- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Weakness
- CWE-79
- Updated
- 2026-11-08
OSVGHSA-xwgp-w3pj-q5h3 8.8
OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document
Summary
An XSS (Cross-Site Scripting) vulnerability occurs when an attacker is able to inject their own JavaScript code into a web page's source, which is subsequently processed by the victim's browser. A common cause of this vulnerability is the failure to validate user-supplied data before displaying it within the vulnerable application without proper filtering. To exploit the vulnerability, an attacker must input HTML code into a vulnerable parameter containing structures that trigger the execution of JavaScript. The DOM XSS variant occurs when user-supplied data is processed by a client-side script; if this data is not handled correctly by the script itself, it becomes possible to inject additional JavaScript commands.
Attacker model: Any actor who can get a DICOM object in front of a victim — email a .dcm
for local viewing, upload to a shared PACS, or operate/compromise a DICOMweb source.
Preconditions: Victim opens a study whose SOP Class is Encapsulated PDF
(1.2.840.10008.5.1.4.1.1.104.1) and OHIF's dicom-pdf extension renders it (default in the
standard modes).
Taint path
Source — two attacker-controlled tags on the encapsulated-document instance:
MIMETypeOfEncapsulatedDocument(0042,0012)EncapsulatedDocument(0042,0011) — the raw document bytes
extensions/dicom-pdf/src/getSopClassHandlerModule.js:15,20 reads the MIME tag with no
validation and passes it as defaultType:
const { SeriesDescription = 'PDF', MIMETypeOfEncapsulatedDocument } = instance;
...
const renderedUrlParams = {
instance,
tag: 'EncapsulatedDocument',
defaultType: MIMETypeOfEncapsulatedDocument || 'application/pdf', // attacker-controlled
singlepart: 'pdf',
};
const renderedUrl = dataSource.retrieve.directURL(renderedUrlParams);
Sink — defaultType becomes the Blob type in all three retrieval paths:
Local file (no server required): extensions/default/src/DicomLocalDataSource/index.js:120-131
directURL: params => {
const { instance, tag, defaultType } = params;
const value = instance[tag];
if (value instanceof Array && value[0] instanceof ArrayBuffer) {
return URL.createObjectURL(new Blob([value[0]], { type: defaultType })); // attacker MIME
}
},
DICOMweb InlineBinary: extensions/default/src/utils/getDirectURL.ts:40-44 →
platform/core/src/utils/b64toBlob.js:18
if (value.InlineBinary) {
const blob = utils.b64toBlob(value.InlineBinary, defaultType); // -> new Blob(..., { type: defaultType })
value.DirectRetrieveURL = URL.createObjectURL(blob);
return value.DirectRetrieveURL;
}
DICOMweb bulk data: extensions/default/src/utils/getDirectURL.ts:52-55
return value.retrieveBulkData(options).then(arr => {
value.DirectRetrieveURL = URL.createObjectURL(new Blob([arr], { type: defaultType }));
return value.DirectRetrieveURL;
});
Render — extensions/dicom-pdf/src/viewports/OHIFCornerstonePdfViewport.tsx:86-92
<object
data={url} {/* blob: URL whose stored MIME = attacker's MIMETypeOfEncapsulatedDocument */}
type="application/pdf" {/* only a hint; overridden by the blob's own Content-Type */}
className={style}
>
Why it fires. A blob: URL stores the MIME type passed at new Blob(..., { type })
construction. When such a URL is navigated/embedded, the browser uses the blob's stored
Content-Type to choose a handler; the <object type="application/pdf"> attribute is a
pre-load hint, not an override. A blob created with type: 'text/html' therefore renders as an
HTML document, and because blob: URLs inherit the creating page's origin, any <script> in it
executes in the OHIF origin — with access to localStorage/sessionStorage, auth tokens,
and same-origin requests to the PACS.
Impact
Users using the applications. If the application is behind authentication then session can be stolen. If on the same DNS name some other applications are hosted, they…
- Record
GHSA-xwgp-w3pj-q5h3- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L - Weakness
- CWE-79
- Updated
- 2026-11-10
History
| Recorded | Changed | Sources |
|---|---|---|
| published | EUVD | |
| affected, references | OSV | |
| affected, facts, references | GitHub Advisories, OSV | |
| aliases, references | EUVD, NVD, OSV | |
| cwes, references, severity, title | CVE List | |
| first indexed | EUVD |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/OHIF/Viewers/security/advisories/GHSA-xwgp-w3pj-q5h3
github.com/OHIF/Viewers/pull/6228
github.com/OHIF/Viewers/commit/db546701bd5f2be9031c835f1de5c40aacd3dc62
github.com/OHIF/Viewers/commit/ef0811c66cdb04ba07ffaba145cf66ce01486899
github.com/OHIF/Viewers/commit/f0dba789a313f40fe7e8a8cbec322a8d8a491d76
github.com/OHIF/Viewers/releases/tag/v3.12.15
Left out here: the rest of 2 source descriptions. The JSON record has them.