diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-09 09:31:22 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-09 09:31:22 +0200 |
| commit | 4a0dadb46994da5ea73ccf93a0a4c445955f310e (patch) | |
| tree | 66eef4a16ebb81d6f5fc3b7490b59a9b891f84fa /docs/plans/2026-09-09-contacts.md | |
| parent | 96beac190b8444fc5b7629daebbf4a67f5ab11e2 (diff) | |
| download | abusectl-4a0dadb46994da5ea73ccf93a0a4c445955f310e.tar.gz abusectl-4a0dadb46994da5ea73ccf93a0a4c445955f310e.zip | |
fix: treat the IANA bootstrap as hostile, not as trusted input
abuse_addresses already treats an RDAP response as attacker-controlled.
The bootstrap document comes off the same network and was trusted
completely, which is backwards: it decides WHICH server is asked, so
subverting it is worth more than subverting an answer.
Three ways that hurt the user:
A non-string CIDR was passed to ipaddress.ip_network, which does not
raise on an integer, it returns a /32. A /32 is the longest possible
prefix, so a planted integer won every longest-prefix contest and steered
the query for the attacker's own address to a server they control. That
server names any abuse address it likes and the user files the phishing
report to the phisher. config.py documents this exact trap for the
trusted relays; the same mistake was repeated here.
A malformed entry raised IndexError, TypeError or KeyError straight out
of server_for_ip. bootstrap() writes whatever JSON it receives to the
cache with no schema check, so one bad response is persisted and crashes
every contacts run for seven days with a traceback pointing at nothing
the user can act on. Entry shape is now guarded in the style
abuse_addresses uses and a bad entry is skipped, never fatal.
_NoDowngradeRedirectHandler guards redirects only, so a bootstrap naming
an http:// base sent the initial query in clear text, disclosing which
netblock the user is investigating to anyone on the path. The selected
URL must now be an https string, which makes the guarantee the module
docstring promises hold end to end rather than only on the redirect path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wrfqr2xqQfhtXCscU7zrdz
Diffstat (limited to 'docs/plans/2026-09-09-contacts.md')
0 files changed, 0 insertions, 0 deletions
