You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The file packages/cli/src/commands/preview-docs/preview-server/preview-server.ts contains a security defect that allows directory traversal of the complete file path on a server and the download of files via query parameters on the request URI.
Describe the bug
The file packages/cli/src/commands/preview-docs/preview-server/preview-server.ts contains a security defect that allows directory traversal of the complete file path on a server and the download of files via query parameters on the request URI.
To Reproduce
http://localhost:8080/jsp/help-sb-download.jsp?sbFileName=../../../../.redocly.yaml
http://localhost:8080/jsp/help-sb-download.jsp?sbFileName=../../{expand as needed}/etc/passwd
Expected behavior
Query parameters should be trimmed from the request URL
Logs
N/A
OpenAPI definition
N/A
openapi-cli
Version(s)1.0.0-beta.55
Node.js
Version(s)15.5.0
Additional context
PR with fix raised at #347
The text was updated successfully, but these errors were encountered: