This library is trivially bypassed with a DNS record that points to a guarded IP address.
This vulnerability exists because the logic does not resolve the domain to determine if the DNS record points to a filtered IP address or similar. This gap trivially allows an attacker to bypass the logic and access resources that this library attempts to protect/guard against.
> dig local.jlleitschuh.org
; <<>> DiG 9.10.6 <<>> local.jlleitschuh.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33804
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;local.jlleitschuh.org. IN A
;; ANSWER SECTION:
local.jlleitschuh.org. 600 IN A 127.0.0.1
;; Query time: 44 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Jul 22 13:38:45 EDT 2025
;; MSG SIZE rcvd: 66
npx ssrfcheck https://local.jlleitschuh.org/whatever
Safe
This trivially allows the SSRF protections to be bypassed by an attacker who can create their own DNS records.
Summary
This library is trivially bypassed with a DNS record that points to a guarded IP address.
Details
This vulnerability exists because the logic does not resolve the domain to determine if the DNS record points to a filtered IP address or similar. This gap trivially allows an attacker to bypass the logic and access resources that this library attempts to protect/guard against.
This vulnerability was originally reported here: felippe-regazio/ssrfcheck#4
PoC
I created a DNS A record that pointed
local.jlleitschuh.orgto127.0.0.1. Checked that this DNS record correctly updated with DIG.Quick POC that demonstrates this vulnerability is present:
Impact
This trivially allows the SSRF protections to be bypassed by an attacker who can create their own DNS records.
Disclosure Timeline
References
Credit