# GHSA-Q324-Q795-2Q5P: Path traversal when using preview-docs when working dir contains files with question mark ? in name

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2021-10-12
- Modified: 2021-10-11

## Affected versions

- @redocly/openapi-cli (npm): fixed in 1.0.0-beta.59

## Description

### Impact
`preview-docs` command allows path traversal if current working dir contains files with question mark `?` in name and attacker knows the name.

### Patches
It was patched starting from 1.0.0-beta.59

### Workarounds
Do not run openapi-cli preview-docs command in the folder which contains files with question mark `?` in name.

### References
https://github.com/Redocly/openapi-cli/pull/347

### For more information
If you have any questions or comments about this advisory:
* Open an issue in [@redocly/openapi-cli](https://github.com/Redocly/openapi-cli)
* Email us at [security@redocly.com](mailto:security@redocly.com)

## References

- https://github.com/Redocly/openapi-cli/security/advisories/GHSA-q324-q795-2q5p
- https://github.com/Redocly/openapi-cli/pull/347
- https://github.com/Redocly/openapi-cli

Page: https://cve.now/GHSA-Q324-Q795-2Q5P

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
