Commit Graph

8 Commits (a5d413a59428e88eb0b69f68d4f021f1caceccb1)

Author SHA1 Message Date
Your Name ca5d9f3db5 MultiExceptionCatchRector 6 days ago
Your Name 8dcdd93e2b RemoveUnusedVariableInCatchRector 6 days ago
Your Name 5ebc1af91e BATCH 1 6 days ago
Your Name 3d82a8e8b2 Fix unauthenticated SSRF in remote media/avatar fetch (variant of CVE-2026-71246)
The remote media path validated URLs only as strings (Helpers::validateUrl
normalizes the host + checks a ban list) and then downloaded them with
Http::head + file_get_contents($url), which resolve DNS themselves and
follow redirects with no private-IP checks and no address pinning. A remote
actor whose icon.url redirected to an internal address (e.g. 172.18.0.1 or
169.254.169.254) made the queue worker fetch internal content and, for
image responses, republish it at a public avatar URL. No account required.

Fixes:
- Add SecureMediaFetchService: validates URL, resolves + rejects non-global
  IPs (fail-closed), pins the connection to the validated IP via
  CURLOPT_RESOLVE, disables auto-redirects with per-hop re-validation, and
  enforces https-only + a byte cap. Mirrors the ActivityPubFetchService
  hardening from CVE-2026-71246.
- Route MediaStorageService head()/fetchAvatar()/remoteToCloud() through it,
  removing the bare Http::head and file_get_contents($url) sinks.
- validateUrl(): when DNS verification is enabled, reject hosts that resolve
  into reserved ranges, closing the metadata.google.internal bypass.
- Harden adjacent same-class sinks: CustomEmojiService (emoji doc + image +
  head), FetchCacheService/webfinger, and DiscoverActor.
- Add regression tests (tests/Unit/ActivityPub/SsrfUrlValidationTest.php).
4 weeks ago
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Shlee ff1406d6bc
Update FetchCacheService.php 8 months ago
Your Name ca6c875bbb Fix PHPStan class.notFound issues 11 months ago
Daniel Supernault f8145a78cf
Add Profile Migrations 3 years ago