No Charset in Content-Type Header in express
Moderate severity
GitHub Reviewed
Published
Oct 23, 2018
to the GitHub Advisory Database
•
Updated Feb 1, 2023
Description
Published by the National Vulnerability Database
Aug 9, 2017
Published to the GitHub Advisory Database
Oct 23, 2018
Reviewed
Jun 16, 2020
Last updated
Feb 1, 2023
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.
References