fix: remove data:text/html from graphicUrl() allowed MIME types (closes #70)#71
Open
LucasMaupin wants to merge 1 commit into
Open
fix: remove data:text/html from graphicUrl() allowed MIME types (closes #70)#71LucasMaupin wants to merge 1 commit into
LucasMaupin wants to merge 1 commit into
Conversation
#70) data:text/html URIs were explicitly permitted by ALLOWED_DATA_MIME, allowing authenticated users to execute arbitrary JavaScript inside Strom's CEF renderer via a graphic overlay URL. Restrict data URI support to image-only MIME types where there is no script execution risk. HTML overlay sources must use an https:// URL pointing to a trusted server. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text/htmlfromALLOWED_DATA_MIMEinsrc/lib/url-validation.ts, restricting data URI support to image-only MIME types (png,jpeg,gif,webp)https://URL rather than an inline data URIsrc/__tests__/url-validation.test.tswith 18 test cases covering all accept/reject paths, including a direct regression test fordata:text/htmlWhy
data:text/htmlURIs were explicitly permitted, allowing an authenticated user to supply a graphic overlay URL containing JavaScript that executes inside Strom's CEF (Chromium Embedded Framework) renderer. Because CEF runs with network access on the Strom host, this enabled SSRF and potential credential exfiltration — a meaningful escalation beyond a simple content injection. Restricting data URIs to image types eliminates script execution risk entirely.HTML overlay sources that previously used inline
data:text/htmlmust be migrated to anhttps://URL served from a trusted web server.Closes #70