CVE-2014-6393: Express missing charset in Content-Type header XSS

CVE-2014-6393 · Severity: low · CVSS 3 · Published 2018-10-23

Express, a popular web framework for Node.js applications, fails to specify a charset field in Content-Type headers for error responses. An attacker can exploit this omission to inject malicious scripts through non-standard character encodings (such as UTF-7), potentially compromising user sessions, stealing credentials, or redirecting users to malicious sites. This affects any website built with vulnerable versions of Express.

Technologies: Express.

Quick answers

Is CVE-2014-6393 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2014-6393 being exploited in the wild.
How severe is CVE-2014-6393?
Low severity, with a CVSS score of 3, published 23 October 2018.
Which products and versions are affected?
Express SEMVER:introduced=0,fixed=3.11.0.
Is there a fix for CVE-2014-6393?
Yes. Express: upgrade to 3.11.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2014-6393 attacked?
It is attacked over the network.
Am I affected by CVE-2014-6393?
Check whether you run Express at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Express: upgrade to 3.11.0 or later

Technical details

Express versions prior to 3.11 and 4.x versions prior to 4.5 do not enforce a charset in the Content-Type header when sending HTTP 400-level error responses. This allows attackers to perform stored or reflected cross-site scripting (XSS) attacks by leveraging non-standard character encodings like UTF-7 to bypass the browser's default charset interpretation. The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). An attacker can craft requests that trigger error responses containing JavaScript payloads encoded in UTF-7, which browsers will interpret and execute. The fix is to update Express to version 3.11 or later for the 3.x branch, or version 4.5 or later for the 4.x branch.

Affected products

  • OpenJS Foundation Express 3.x < 3.11, 4.x < 4.5

Identifiers

  • CVE-2014-6393
  • GHSA-gpvr-g6gh-9mc2

Timeline

  • 2014: disclosed: Vulnerability initially discovered
  • 2018-10-23: advisory: GHSA advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.