Packages / restify / Security

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.0
Every release on a timeline
12.x
  1. Not affected

    12.0.0 – 12.1.0

    2 releases, latest

4.x
  1. Affected

    4.0.0 – 4.0.4

    5 releases

  2. Fixed

    4.1.0 – 4.3.4

    8 releases

3.x
  1. Affected

    3.0.0 – 3.0.3

    4 releases

2.x
  1. Affected

    2.0.0 – 2.9.0

    31 releases

174 stable releases of restify, oldest to newest, one row per major.

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.