mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
GHSA-5q84-p3vr-f3xv: a board member with write access chooses the List Sync server URL for Gitea, Forgejo, GitLab and Jira. It was fetched with the platform fetch(), so it reached 127.0.0.1, private networks and the cloud metadata address, and up to 200 bytes of a failed response were copied into the error the preview returns and lastSyncError stores. An open and a closed internal port also answered differently. Every request now goes through fetchSafe: internal addresses refused, DNS pinned, redirects refused, response size and time bounded. An error carries the origin and HTTP status only, a non-JSON answer says so without quoting it, and a guard refusal is one message that does not name what a host resolved to. Saving Sync settings refuses an internal address too, so none is stored. Both refusals are recorded as SyncBleed in Admin Panel -> Problems. A self-hosted tracker on the server's network is allowed only by the administrator, with LIST_SYNC_ALLOWED_PRIVATE_HOSTS (exact hosts); the test server allows 127.0.0.1 for the List Sync specs' mock tracker. The browser test found that an IPv6 literal such as [::1] kept its brackets and was looked up as a name at save time; the shared validator now checks it as an address. tests/syncBleed.test.cjs reproduces the report on the real fetcher for every provider, and fails on a platform fetch() to anything but a fixed or administrator-allowed host, or a response body copied into an error, anywhere in the server tree. list-sync-source.e2e.js saves and previews internal addresses in the browser and checks no request reaches the mock tracker. securityRegressionCoverage lists CacheBleed and SyncBleed with their tests. Thanks to alham-rizvi and xet7 !