Skip to content

Path traversal when using `preview-docs` when working dir contains files with question mark `?` in name

Low severity GitHub Reviewed Published Oct 9, 2021 in Redocly/redocly-cli • Updated Jan 9, 2023

Package

npm @redocly/openapi-cli (npm)

Affected versions

<= 1.0.0-beta.58

Patched versions

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

Redocly/redocly-cli#347

For more information

If you have any questions or comments about this advisory:

References

@RomanHotsiy RomanHotsiy published to Redocly/redocly-cli Oct 9, 2021
Reviewed Oct 11, 2021
Published to the GitHub Advisory Database Oct 12, 2021
Last updated Jan 9, 2023

Severity

Low

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-q324-q795-2q5p

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.