---
title: "GHSA-qw3g-35hc-fcrh: Cross-Site Scripting (XSS) in restify"
description: "Moderate severity. Cross-Site Scripting (XSS) in restify. Affects restify; fixed in 4.1.0."
url: https://inlinr.com/advisories/GHSA-qw3g-35hc-fcrh
lang: en
---

[Packages](https://inlinr.com/packages) / [restify](https://inlinr.com/packages/restify) / [Security](https://inlinr.com/packages/restify/security)

Moderate Vulnerability GHSA-qw3g-35hc-fcrh CVE-2017-16018 Published 9 Nov 2018

# Cross-Site Scripting (XSS) in restify

Your version 

Affected releases · [restify](https://inlinr.com/packages/restify)

- 4.x 4.0.0 – 4.0.4 Fixed in 4.1.0
- 3.x and older 2.0.0 – 3.0.3 No 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.

## How it is exploited

Exploitable over the network, with no account and a user to do something.

- **Confidentiality**: low
- **Integrity**: low
- **Availability**: none

CVSS:3.0/​AV:N/​AC:L/​PR:N/​UI:R/​S:C/​C:L/​I:L/​A:N

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2017-16018 "https://nvd.nist.gov/vuln/detail/CVE-2017-16018")  
nvd.nist.gov/vuln/detail/CVE-2017-16018
- [Issue](https://github.com/restify/node-restify/issues/1018 "https://github.com/restify/node-restify/issues/1018")  
#1018
- [GitHub advisory](https://github.com/advisories/GHSA-qw3g-35hc-fcrh "https://github.com/advisories/GHSA-qw3g-35hc-fcrh")  
github.com/advisories/GHSA-qw3g-35hc-fcrh
- [Reference](https://www.npmjs.com/advisories/314 "https://www.npmjs.com/advisories/314")  
npmjs.com/advisories/314

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
