ModerateVulnerabilityGHSA-qw3g-35hc-fcrhCVE-2017-16018Published 9 Nov 2018
Cross-Site Scripting (XSS) in restify
Your version
Affected releases · restify
- 4.x4.0.0 – 4.0.4Fixed in 4.1.0
- 3.x and older2.0.0 – 3.0.3No fix, no longer updated
On 4.x, the newest line:
npm install restify@4.1.0Every release on a timeline
12.x
Not affected
12.0.0 – 12.1.0
2 releases, latest
4.x
Affected
4.0.0 – 4.0.4
5 releases
Fixed
4.1.0 – 4.3.4
8 releases
3.x
Affected
3.0.0 – 3.0.3
4 releases
2.x
Affected
2.0.0 – 2.9.0
31 releases
What happens
Affected versions of restify are susceptible to a cross-site scripting vulnerability when using URL encoded script tags in a non-existent URL.
Proof of Concept:
Request
https://localhost:3000/no5_such3_file7.pl?%22%3E%3Cscript%3Ealert(73541);%3C/script%3E
Will be included in response:
<script>alert(73541);</script>
Recommendation
Update to version 4.1.0 or later.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.