SSRF: localhost block checks only the literal host, so Allow Private IPs opens loopback #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eric/apprise-wordpress-notifications#4
Loading…
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?
Found in security audit run 3 (2026-10-16,
06d630d). Severity: low.Problem
resolve_and_validate_url()runsis_loopback_address()only on the literal URL host (includes/class-apprise-client.php:412), never on the resolved IP. A loopback address reached any other way falls through to the private/reserved range check (:463), and the admin "Allow Private IPs" setting overrides that check (:489-490).The localhost exception is meant to be code-only, through the
apprise_notifications_allow_localhostfilter. Its docblock says this is to stop admins probing local services. With the setting on, an admin can still reach localhost using[::],0177.0.0.1,2130706433,127.1, or any hostname that resolves to 127.x. Test Connection then returns the transport error or status code, which shows whether a port is open.is_loopback_address()also treats0.0.0.0as loopback but not its IPv6 equivalent::(:636-637).This matters where admins can't otherwise run code: multisite subsite admins, or sites with
DISALLOW_FILE_MODS.Fix
is_loopback_address(). Send any match throughapprise_notifications_allow_localhostbefore the private-range override.0.0.0.0/8and::as loopback.tests/Unit/ClientTest.phpwithallow_private_ips = true:[::],0177.0.0.1,2130706433,127.1, and a name resolving to 127.x. Each should givelocalhost_blocked.