Repository navigation
MirrorProxy v1.8.3
Security fixes
Bounded Prometheus HTTP method labels (GHSA-vh4g-fm5v-w9qf)
Prometheus HTTP request and duration metrics now normalize the method label to a bounded allowlist of standard HTTP methods, collapsing unknown methods to OTHER. This prevents unauthenticated clients from creating unbounded Prometheus time series with arbitrary HTTP method tokens (affecting versions >= 1.1.0, < 1.8.3). Thank you to @lml20000827 for reporting GHSA-vh4g-fm5v-w9qf.
Proxy browser isolation, Pub & OCI path hardening, and SSRF consistency
- All proxied routes now return a sandboxed Content Security Policy (
sandbox; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none') and strip upstreamSet-CookieandClear-Site-Dataresponse headers to protect same-origin administration and user sessions. - Pub storage downloads under
/pub/upstream/storage.googleapis.com/are restricted to officialpub-packages/packages/*.tar.gzarchives and served withContent-Type: application/octet-streamandContent-Disposition: attachment. - OCI path parsing now rejects traversal and invalid segments in the post-marker suffix (
manifests,blobs,tags,referrers) as well as repository segments. - Proxy redirect and OCI bearer token destination validation now reuses the stricter
download::public_ipblocklist (including Azure platform IP168.63.129.16/32and non-global IPv6 ranges) with a 5-second DNS timeout and 64-address cap.
Bounded metadata reads and authentication rate-limit hardening
- Metadata rewriting in PyPI, npm, Composer, NuGet, and Pub now enforces both
Content-Lengthand streamed byte limits (32 MiBper package response,128 MiBfor the PyPI root index), returning HTTP 502 if exceeded and streaming non-rewritten responses directly. OCI bearer token responses (1 MiB) and GeoIP updates (80 MiB) also use chunked bounded reads. POST /api/admin/loginand SMTP email login rate limiting now resolve client IPs viatrusted_proxiesrather than sharing a single"unknown"or reverse-proxy bucket.- Passkey login endpoints (
/admin/api/auth/passkey/login/startand/finish) are rate-limited per client IP, and discoverable challenges are capped per source IP so one client cannot exhaust the global pool.AdminLoginRateLimiternow bounds total keys and username length. - OAuth account linking (
/api/account/providers/{slug}/link/start) now uses CSRF-protectedPOST, verifies the active user session on callback, and checksuser.disabledbefore auto-linking. Email login verification enforces same-origin checks,Cache-Control: no-store, andregistration.mode == "disabled", while the web console immediately clears magic-link tokens from the address bar. UpstreamAuthredacts credentials inDebugoutput, and alert webhook delivery uses a hardened HTTP client with no ambient proxy, no redirects, and explicit timeouts.
Installer, packaging, dependency, and CI hardening
scripts/install.shandscripts/install.ps1now fetch.sha256checksum files directly from GitHub Releases even when--mirror/-Mirroris used for the archive download, with stricter SHA-256 format validation and TLS 1.2+ enforcement on Windows PowerShell 5.1.- Linux DEB and RPM server packages install
/etc/mirrorproxy/config.tomlwith0600permissions (and registerDEBIAN/conffiles), and APT repository signing passes GPG passphrases via a0600temporary file instead of command-line arguments. - Web dependency overrides update
cross-spawn(7.1.2),react-router/react-router-dom(7.18.7), andglob(14.0.7), resolving allnpm auditfindings. - Release and Docker workflows pin third-party publish actions to commit SHAs, validate
wingetcreate.exeAuthenticode signatures and tag format via environment variables, and drop unnecessary workflow write permissions.
Compatibility and upgrade notes
- Proxy responses & Pub: Only official
pub-packages/packages/*.tar.gzarchives are served under/pub/upstream/storage.googleapis.com/, and rewritten package metadata responses larger than32 MiB(128 MiBfor PyPI root index) return HTTP502 Bad Gateway. - Mirrored client installation: When installing with
--mirroror-Mirror, direct HTTPS reachability to GitHub is required to verify the official.sha256checksum before unpacking or replacing the client. - Email verification: If
registration.mode = "disabled", pending email invitations can no longer create new accounts.
Verification and rollback
Back up /etc/mirrorproxy/config.toml (or your active config.toml) and the SQLite database, verify the release artifact against SHA256SUMS, replace the binary, and restart the service. Confirm --version reports 1.8.3, verify /healthz and /version, and test a representative package proxy route (for example, fetching /pub/api/packages/http and confirming unrelated storage buckets return HTTP 400 with a sandboxed CSP). If rollback is required, restore the previous binary and pre-upgrade backup.