GHSA-gvff-25cc-4f66 Path Traversal in restify-swagger-jsdoc
Attackers can access server files outside the intended directory via path traversal in restify-swagger-jsdoc.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-gvff-25cc-4f66?
GHSA-gvff-25cc-4f66 is a path traversal vulnerability in restify-swagger-jsdoc, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Versions of restify-swagger-jsdoc prior to 3.2.1 are vulnerable to Path Traversal. The package fails to properly sanitize URLs, which may allow attackers to access server files outside the swagger-ui folder by using relative paths.
Recommendation
Upgrade to version 3.2.1 or later.
Which versions are affected by GHSA-gvff-25cc-4f66?
2 open source packages ship an affected version, including restify-swagger-jsdoc.
| Package | Affected | Fixed in |
|---|---|---|
restify-swagger-jsdoc npm | All versions | 3.2.1 |
restify-swagger-jsdoc npm | All versions | 3.2.1 |
How do I fix GHSA-gvff-25cc-4f66?
Upgrade restify-swagger-jsdoc to 3.2.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is GHSA-gvff-25cc-4f66 being exploited?
There is no known exploitation of GHSA-gvff-25cc-4f66 in the wild and no public exploit code.