GHSA-v4x8-gw49-7hv4 Path Traversal in swagger-injector
Attackers can read server files outside the configured directory due to unsanitized URLs in swagger-injector.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is GHSA-v4x8-gw49-7hv4?
GHSA-v4x8-gw49-7hv4 is a path traversal vulnerability in swagger-injector, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
All versions of swagger-injector are vulnerable to Path Traversal. The package fails to sanitize URLs, allowing attackers to access server files outside of the configured dist folder using relative paths.
Recommendation
No fix is currently available. Consider using an alternative package until a fix is made available.
Which versions are affected by GHSA-v4x8-gw49-7hv4?
2 open source packages ship an affected version, including swagger-injector.
| Package | Affected | Fixed in |
|---|---|---|
swagger-injector npm | From 0.0.0 | None |
swagger-injector npm | From 0.0.0 | None |
How do I fix GHSA-v4x8-gw49-7hv4?
No fix has been published for GHSA-v4x8-gw49-7hv4 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is GHSA-v4x8-gw49-7hv4 being exploited?
There is no known exploitation of GHSA-v4x8-gw49-7hv4 in the wild and no public exploit code.