Skip to content

Conversation

seborama
Copy link
Contributor

@seborama seborama commented Apr 28, 2025

I am using kin-openapi on a project and Snyk blocked me with an error:

Path Traversal
Unsanitized input from the request URL flows into os.ReadFile, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files.

This PR proposes a remediation.

Thank for this really useful library!

@fenollp
Copy link
Collaborator

fenollp commented Apr 29, 2025

Does path.Clean resolve the Snyk warning?

@seborama
Copy link
Contributor Author

seborama commented May 1, 2025

As far as I can tell, using this branch with a replace statement in the go.mod, seems to have put Snyk at peace.

@fenollp fenollp changed the title fix: resolve Snyk security warning with path traversal openapi3: resolve Snyk security warning with path traversal May 1, 2025
@fenollp fenollp merged commit bf26c56 into getkin:master May 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants