snappymail/snappymail/v/0.0.0
djmaze 650133ae8a @ZaphodB fix(security): SSRF gate let through CGNAT, multicast and the server's own IPs
URIHasPublicHost() relied on FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE
alone. On PHP 8.4 that passes 100.64.0.0/10 (shared space: CGNAT, Tailscale,
Alibaba metadata at 100.100.100.200), 192.0.0.0/24, 198.18.0.0/15,
224.0.0.0/4, fec0::/10 and ff00::/8. It also passed the server's own public
addresses: a fetch to them never leaves the host, so it reaches services that
listen on every address but are firewalled from outside (on our host: grafana,
forgejo, prometheus and the exporters).

Both checks, on the literal host and on every resolved address, now go through
IsPublicIP(): PHP's flags, then an explicit list of the ranges above, then the
addresses net_get_interfaces() reports for this host (cached per request).

test/ssrf-ranges.php checks the new ranges and their edges, that ordinary
public addresses still pass, and the own-address rule via the cache. Before
this change 100.64.0.1 was treated as public. DNS rebinding between check and
connect is still not covered; that needs the connection pinned to the checked
address.
2026-10-27 01:30:31 +01:00
..
app @ZaphodB fix(security): SSRF gate let through CGNAT, multicast and the server's own IPs 2026-10-27 01:30:31 +01:00
static Resolve #1408 2024-01-29 11:25:42 +01:00
themes Resolve #1775 2024-10-06 23:46:53 +02:00
cpanel.php cPanel use extension login-cpanel instead of login-remote 2024-04-17 01:10:03 +02:00
imapsync.php fixed typo in imapsync.php: was "RainLoop\API" instead of "RainLoop\Api" 2025-11-19 23:10:15 +01:00
include.php Drop md5(file_get_contents(DATA.php)) because i think nobody used this undocumented feature 2024-08-11 12:39:34 +02:00
index.php Rename basefolder 'rainloop' to 'snappymail' 2020-10-15 16:21:52 +02:00
setup.php Prevent mkdir() error #1565 2024-04-28 14:50:08 +02:00