Skip to content

fix: add URL validation in file.store.js (CWE-918) - #200

Open
anupamme wants to merge 1 commit into
Open3CL:mainfrom
anupamme:fix-repo-engine-cwe-918-ssrf-file-store
Open

anupamme wants to merge 1 commit into
Open3CL:mainfrom
anupamme:fix-repo-engine-cwe-918-ssrf-file-store

Conversation

@anupamme

Copy link
Copy Markdown

The downloadXlsxFileAndConvertToJson method accepts a URL parameter and passes it directly to fetch() without any validation. This allows an attacker to supply arbitrary URLs, including internal network addresses, cloud metadata endpoints, or file:// URIs, leading to Server-Side Request Forgery. This was found by static analysis at src/core/file/infrastructure/adapter/file.store.js:11. I have not demonstrated an exploit against your deployment, so please judge it against your own threat model.

Reference: CWE-918

What changed

  • src/core/file/infrastructure/adapter/file.store.js

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security

This branch has not been deployed

No deployments
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.

1 participant