mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2564] [CLOSED] SECURITY.md: a page cors_origins lets in can have the server download image URLs, internal addresses too #4129
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2564
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:chief-docs/security-cors-images📝 Commits (1)
d382e7fSECURITY.md: a page cors_origins lets in can have the server download image URLs, internal addresses too📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
SECURITY.md(+4 -1)📄 Description
What it changes. One bullet of SECURITY.md's "What the server exposes" (CORS). With
"cors_origins"listing a page (or["*"]), that page's/v1requests are accepted without a key when none is set (origin_allowed), andhttp(s)image URLs in them pass_no_local_imagesand are downloaded by the server (Vision.download,urllib, redirects followed) when it reads images. A failed download comes back as a 400 ("the image URL could not be read: ... Connection refused") with the CORS header, so the page can probe addresses on the user's network. The bullet now says so, says to list only pages you trust, and that files on the PC are still not read for such a page.What it leaves alone. The server: this follows from the setting the user chose rather than from a gate the server misses, so it is documented, not changed. Without
cors_originsa foreign page gets 403 before anything is fetched. Every other line of SECURITY.md.How it was checked. A test against
serve.server.serve(...)with a fake vision encoder,cors_origins: ["*"], anOrigin: http://evil.examplerequest with animage_urlon127.0.0.1: the internal listener received the GET, and a closed port's error came back withAccess-Control-Allow-Origin: *. Each sentence was checked against_cors,_foreign_page,origin_allowed,_no_local_imagesandVision.downloadby a sub-agent reviewer (its two wording fixes are in). Found in a security read ofserve/server.py(#544's invitation).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.