Lucene search

K
nodejsRichard GibsonNODEJS:329
HistoryMar 20, 2017 - 11:48 p.m.

Cross-Site Scripting

2017-03-2023:48:36
Richard Gibson
www.npmjs.com
7286

Overview

Affected versions of jquery are vulnerable to cross-site scripting. This occurs because the main jquery function uses a regular expression to differentiate between HTML and selectors, but does not properly anchor the regular expression. The result is that jquery may interpret HTML as selectors when given certain inputs, allowing for client side code execution.

Proof of Concept

$("#log").html(
    $("element[attribute='<img src />']").html()
);

Recommendation

Update to version 1.9.0 or later.

References

CPENameOperatorVersion
jqueryge1.7.1 <=1.8.3
Related for NODEJS:329