Security context
Medium· 6.1GHSA-gpvr-g6gh-9mc2 CVE-2014-6393CWE-79Published Oct 23, 2018

No Charset in Content-Type Header in express

Research this vulnerability

Research is free — Hunters explains how the bug works, the root-cause code pattern, how the fix addresses it, and how to test whether a target is affected, in chat. Investigate & write exploit is a paid run — the engine reads the advisory and fix commits, then builds and validates a working proof-of-concept exploit with reproduction steps.

Affected versions

0 → fixed in 3.11.04.0.0 → fixed in 4.5.0

Details

Vulnerable versions of express do not specify a charset field in the content-type header while displaying 400 level response messages. The lack of enforcing user's browser to set correct charset, could be leveraged by an attacker to perform a cross-site scripting attack, using non-standard encodings, like UTF-7. ## Recommendation For express 3.x, update express to version 3.11 or later. For express 4.x, update express to version 4.5 or later.

The fix

No fix commit could be resolved for this advisory (it may reference an issue tracker or a non-GitHub patch). See the references below.

References