Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › JavaScript

CVE-2026-118670 — OHIF Viewers: DOM-Based Cross Site Scripting (XSS) through MIME type of document

High · CVSS 8.8EPSS 0.5% First seen November 10, 2026
JavaScriptWebBrowsersEmailVulnerabilities

Analysis

CVE-2026-118670: DOM XSS in OHIF Viewers dicom-pdf extension via attacker-set MIME type

A DOM-based cross-site scripting flaw in the OHIF Viewers dicom-pdf extension (@ohif/extension-dicom-pdf) is rated HIGH, with a CVSS score of 8.8. Fixed releases are available for 3.12, 3.13 and 3.14 branches, but the advisory says versions 3.5 to 3.11 will not receive a fix.

Key points

  • DOM XSS in @ohif/extension-dicom-pdf, rated HIGH (CVSS 8.8)
  • Triggered when a user opens an Encapsulated PDF DICOM object that the extension renders
  • Injected script would run in the OHIF origin, exposing tokens, storage and PACS requests
  • Fixed in 3.12.18, 3.13.10 and 3.14.0-beta.36; versions 3.5 to 3.11 will not be fixed
  • No exploitation status is stated in the source material

What's affected

The flaw is in the dicom-pdf extension for OHIF Viewers, published on npm as @ohif/extension-dicom-pdf. The advisory, GHSA-xwgp-w3pj-q5h3, describes a DOM-based cross-site scripting (XSS) issue. The extension reads a MIME type value from a DICOM encapsulated-document object and uses it without validation when it builds the document it displays.

The advisory says exposure requires a user to open a study whose object uses the Encapsulated PDF SOP Class and that the extension renders it, which it describes as the default in standard modes. Fixed versions are 3.12.18, 3.13.10 and 3.14.0-beta.36. Teams building OHIF from source should use tags 3.12.15, 3.13.7 or 3.14.0-beta.19. Versions 3.5 through 3.11 will not receive a fix, so they need to move to a patched 3.12, 3.13 or 3.14 release.

How serious is it

The advisory rates the issue HIGH. According to the advisory, an attacker only needs to get a crafted DICOM object in front of a victim. The listed routes are emailing a .dcm file for local viewing, uploading it to a shared PACS, or operating or compromising a DICOMweb source.

The advisory states that injected script would run in the OHIF origin. That gives it access to local and session storage, authentication tokens and same-origin requests to the PACS. If the viewer sits behind a login, a session could be stolen. The advisory also warns that other applications hosted on the same DNS name are affected.

Exploitation status

The source material does not say whether this flaw is being exploited in the wild, and it does not include public exploitation reports. Treat exploitation status as unconfirmed and assume exposure until your deployments are patched.

What to do

Upgrade the extension to a fixed release on your branch. Where patching is not possible yet, limit viewing to studies from trusted sources and avoid opening encapsulated PDF objects from unknown senders. Serving OHIF from a dedicated hostname that does not share a DNS name with other internal applications reduces the impact of script running in its origin. Inventory every OHIF deployment and confirm which extension version each one runs.

Recommended actions

  1. Upgrade @ohif/extension-dicom-pdf to 3.12.18, 3.13.10 or 3.14.0-beta.36, or source builds to tags 3.12.15, 3.13.7 or 3.14.0-beta.19.
  2. Plan migration off versions 3.5 through 3.11, since the advisory says they will not receive a fix.
  3. Until patched, restrict viewing to studies from trusted sources and avoid opening encapsulated PDF objects from unknown senders.
  4. Host OHIF on a dedicated hostname so script running there cannot reach other applications on the same DNS name.
  5. Inventory all OHIF deployments and record the installed extension version for each.

Written with AI assistance from the sources listed on this page; check the vendor advisory before acting.

Severity breakdown

High · 8.8 CVSS 3.1 base score from the CNA (github.com)

An attacker without an account can exploit this over the network if a user is tricked into an action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
yes, someone must click, open or visit something
Scope
reaches beyond the vulnerable component (e.g. from a sandbox or VM to the host)
Impact
high on confidentiality, low on integrity and availability

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected and fixed versions

ProductAffected versionsFixed in
@ohif/extension-dicom-pdf (npm)≥ 3.5.0-beta.0, < 3.12.183.12.18
≥ 3.13.0-beta.0, < 3.13.103.13.10
≥ 3.14.0-beta.0, < 3.14.0-beta.363.14.0-beta.36
OHIF Viewers>= 3.5.0-beta.0, < 3.12.15, >= 3.13.0-beta.0, < 3.13.7, >= 3.14.0-beta.0, < 3.14.0-beta.19—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

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 are also impacted.

Patches

Fixed in @ohif/extension-dicom-pdf 3.12.18, 3.13.10 and 3.14.0-beta.36 (fix: https://github.com/OHIF/Viewers/pull/6228). If you build OHIF from source, the fix first landed in tags 3.12.15, 3.13.7 and 3.14.0-beta.19. Versions 3.5 to 3.11 will not receive a fix. Upgrade to a patched 3.12, 3.13 or 3.14 version.

Source: GHSA-xwgp-w3pj-q5h3 / CVE-2026-118670, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • npm:@ohif/extension-dicom-pdf

What to do

  • Check whether you run an affected product or version and apply the vendor's update or mitigation.
  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-118670?

A DOM-based cross-site scripting flaw in the OHIF Viewers dicom-pdf extension (@ohif/extension-dicom-pdf) is rated HIGH, with a CVSS score of 8.8. Fixed releases are available for 3.12, 3.13 and 3.14 branches, but the advisory says versions 3.5 to 3.11 will not receive a fix. Weakness type: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79).

How severe is CVE-2026-118670?

CVE-2026-118670 has a CVSS 3.1 base score of 8.8 (high), from the CNA (github.com). An attacker without an account can exploit this over the network if a user is tricked into an action.

Is CVE-2026-118670 being exploited?

Not as far as is known: CVE-2026-118670 is not in CISA's Known Exploited Vulnerabilities catalog as of November 30, 2026. EPSS estimates a 0.5% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-118670?

@ohif/extension-dicom-pdf (npm) ≥ 3.5.0-beta.0, < 3.12.18 (fixed in 3.12.18); @ohif/extension-dicom-pdf (npm) ≥ 3.13.0-beta.0, < 3.13.10 (fixed in 3.13.10); @ohif/extension-dicom-pdf (npm) ≥ 3.14.0-beta.0, < 3.14.0-beta.36 (fixed in 3.14.0-beta.36); OHIF Viewers >= 3.5.0-beta.0, < 3.12.15, >= 3.13.0-beta.0, < 3.13.7, >= 3.14.0-beta.0, < 3.14.0-beta.19.

How do I fix CVE-2026-118670?

Upgrade @ohif/extension-dicom-pdf to 3.12.18, 3.13.10 or 3.14.0-beta.36, or source builds to tags 3.12.15, 3.13.7 or 3.14.0-beta.19. Plan migration off versions 3.5 through 3.11, since the advisory says they will not receive a fix. Until patched, restrict viewing to studies from trusted sources and avoid opening encapsulated PDF objects from unknown senders.

Timeline & sources

References

Related vulnerabilities & news