# SSRF URL Validation Review for Webhooks

SSRF URL Validation Review for Webhooks is a SKILL.md that SSRF URL validation review; an agent buys it once for $0.03 over x402.

- Page: https://aiskills402.com/skills/ssrf-url-validation-review
- Category: Code & Engineering (https://aiskills402.com/categories/code)
- Price: $0.03 once, USD-priced, paid in USDC on Base over x402. Price as loaded on this page. The 402 response your agent receives is authoritative.
- Version: 1.0.0
- Card (JSON): https://api.aiskills402.com/v1/skills/ssrf-url-validation-review

## Use it when

SSRF URL validation review. Reviews code that checks an address supplied by a client (a webhook or callback URL, a "check this site" feature, an import by link) in a service that later calls that address itself, on a Cloudflare Worker or in Node. Finds the checks that look complete and still let a bad address through or break a good one: a host check that strips one trailing dot and so passes two dots, an address with a user name or password that Node 24 fetch refuses at call time although it was accepted and saved, a path prefix check fooled by an encoded slash or a double-encoded dot segment, plus the known rules (empty url.port for a default port, checking only at registration, private and metadata addresses, redirects, DNS rebinding, a test bypass taken from a request header, a block that covers a whole shared domain). Gives the fix in code for each finding and ends a review with VERDICT: OK (nothing must change) or VERDICT: CHANGE. Use when asked to review SSRF protection, webhook URL validation, an allow-list or deny-list of hosts, or a callback address check.

## Not for

Penetration testing, network firewall rules and cloud egress policy. It reads the code that checks a client's address and the call that follows; it does not send anything to a real address. The facts were measured on Node 24 and the WHATWG URL class; other runtimes parse addresses differently.

## Tested, honestly

Tested 2026-11-26.

- Strong model (claude-sonnet-5-5 (Claude Code alias "sonnet")): Right on all 15 setups, read by hand, in two full runs of the final text: it found the second trailing dot in a host list, the user name and password in a saved address that Node 24 fetch refuses at delivery, the encoded and double-encoded dot segments that pass a path prefix check, the default port written as an empty string, the test exception any caller can switch on, the block that covers a whole shared domain and the check that runs only at registration. It answered nothing must change for the seven sound setups, including the encoded slash that a real API needs.
- Weak model (claude-haiku-5-5 (Claude Code alias "haiku")): Right on 12 of 15 with the skill, but it missed one defect and over-reported on two sound setups: it called the saved user name and password out of scope and answered nothing must change on the credentials setup; on the path-scope setup it reported a hex-case difference in an encoded slash as a false refusal; on the shared-domain setup it asked for a second check at call time that the pasted code did not need. It found the trailing dots, the encoded dot segments, the port, the test header and the shared-domain block.

Note: Fifteen address-check setups written by us (8 with one planted fault, 7 sound): trailing dots, credentials in the address, a path prefix with encoded dot segments, the default port, a test exception, a shared platform domain and a check made only at registration. Each answer is scored by code: the verdict line plus the named fault, or nothing must change. Facts measured by us on Node 24.16 with the scripts in the project notes (26 November 2026): two trailing dots stay in hostname, fetch and Request throw for an address with credentials, encoded and double-encoded dot segments stay in pathname. Not measured on Cloudflare Workers. After the first final run one sound path-scope setup was fixed because both models found a real gap in it (a broken escape was kept and the rest of the segment left undecoded); that case was re-run with both models. The skill text got one wording change after it (a fault that only an earlier, already-reviewed step could catch is not reported), and the final text was run twice for Sonnet and once for Haiku. Mutation checks on copies of the skill, Sonnet only: each fact taken out together with every mention of it makes Sonnet miss its planted fault (credentials 1 of 1, trailing dots 2 of 2, encoded path 2 of 2); all three taken out give 11 of 15. One run per model and setup.

### With and without the skill

Tested 2026-11-26.

- Setups reviewed right (15 setups): Sonnet 15/15 with, 12/15 without; Haiku 12/15 with, 13/15 without.

Same request on both sides; the bare side is scored on the concept in any words, with a fence removed first. Read by hand, Sonnet without the skill already knew the default port, the test header, the shared-domain block, the check at registration only and the dot segments that URL itself collapses. It missed three things in code that looks careful: a second trailing dot, a user name and password in the address, and an encoded dot segment behind a path prefix; each time it answered nothing must change. Haiku without the skill found the trailing dots but missed the credentials and the encoded dot segments. Haiku with the skill found the encoded dot segments and missed the credentials as out of scope, and it over-reported on two sound setups, so on these cases the skill did not help Haiku overall (12 with, 13 without).

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

Full summary: https://aiskills402.com/skills/ssrf-url-validation-review/tests

## Example

### English (claude-sonnet-5-5)

Before:

> Before we ship: customers of our service register a URL, which the service later calls by itself on a schedule. It is a Node 24 service (it calls with the built-in fetch; env.DB is its database handle). Below is the URL check I wrote. Spec: - The service only ever calls https URLs, on the standard port. - It never calls our own hosts: app.example.com, api.example.com and anything under them.…

After:

> **`[URL-CREDENTIALS]`** `checkUrl`, in `url-check.ts` after the `new URL(raw.trim())` parse `username` and `password` are never looked at. `https://user:pass@customer.example/hook` parses, passes every check, and `url.href` is stored with the credentials in it. Node 24 `fetch` throws a `TypeError` for an address with credentials, so every scheduled call to it fails before any network traffic.…

## What is in the file

- Facts this review rests on
- What to check, in this order
- 1. Host normalization and comparison
- 2. Credentials in the address
- 3. Path scope
- 4. The known rules
- Symptom questions
- Answer format
- Not a finding
- What not to do

## Languages

Any language

## How to buy

Agent (HTTP):

1. GET https://api.aiskills402.com/v1/skills/ssrf-url-validation-review/file without a payment header. The answer is 402 with a PAYMENT-REQUIRED header (x402 v2): exact amount, asset, network, recipient.
2. Sign `accepts[0]` with an x402 client (for example @x402/core + @x402/evm).
3. Repeat the GET with the signature in the PAYMENT-SIGNATURE header. The answer is 200 with the file, its sha256 and a re-download token.

Agent (MCP): https://mcp.aiskills402.com/mcp — free tools search_skills, get_skill, redownload_skill. Buying itself is over HTTP.

Full flow: https://aiskills402.com/docs

## The file

- Version: 1.0.0
- Size: 12.7 KB (13032 bytes)
- SHA-256: e81958b6d3ff959112066657999f4e4f005cfcc5c3f8ad37b32b52586d931900
- Updated: 2026-11-26
- New versions are free through your re-download token.

## Versions

### 1.0.0 (2026-11-26)

- Measured on 15 setups, one run per model and setup: Sonnet 15/15 with the skill (two full runs), 12/15 without; Haiku 12/15 with, 13/15 without. Price 30000 micro-USDC ($0.03): a gain of three setups for Sonnet, none for Haiku. - Judging rule added: a fault that only an earlier, already-reviewed step could catch is not reported against the pasted code (a first run reported credentials in a path-scope review whose spec said the address was already checked). - Test case fix: the "sound" path-scope code decoded a path segment by segment and kept a segment whose escape was broken, so an encoded dot segment next to it was never seen — both models rightly flagged it. The code now refuses a broken escape. Cases re-run: clean-path-scope. - Scope of the credentials fact stated: measured on Node 24.16 only, not on Cloudflare Workers. The measuring scripts and their output are in the project notes.

- Mutation checks on copies of the skill, Sonnet only: with one fact and every mention of it taken out, its planted fault is missed (credentials 1 of 1 runs, trailing dots 2 of 2, encoded path 2 of 2); with all three taken out, 11 of 15. A first, partial removal that left each fact in the description and the symptom list still let Sonnet find two of the three, so that run said nothing.

- First version: three measured facts (trailing dots beyond the first, credentials in an address with Node 24 fetch, encoded and double-encoded dot segments past a path prefix check) and the known rules as a short list.

## License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Terms: https://aiskills402.com/docs#license

## FAQ

### Node 24 or Workers, which one does this review assume?

The check that a service runs on an address a client gave it (a webhook, a callback, a link to import) before it calls that address itself, in a Cloudflare Worker or in Node. It covers the host comparison, the address parts, the path prefix and the call that follows.

### What does it find that a general security review misses?

Three things that sit inside code that looks careful: a trailing-dot rule that removes only one dot, userinfo in a saved address, which Node 24 fetch refuses at call time, and a path prefix check that an encoded slash or a double-encoded dot segment gets past.

### Will it reject every encoded slash?

No. Some real APIs carry an encoded slash inside one segment, so the skill decodes the path to a stable form and looks at the segments instead of refusing the character.

### Does it help Claude Sonnet?

Sonnet alone handled the default port, the test header, the shared platform domain and the check done only at registration, but it waved through a host with two trailing dots, an address carrying a user name and password, and an encoded dot segment behind a path prefix, answering that nothing must change each time. Fifteen setups: twelve right without the skill, all fifteen with it in two runs. Haiku was level (twelve with, thirteen without), so it is not a reason to buy for Haiku.

## Measurement limits

- Models other than the two named above were not run.
- Each verdict comes from the test run on the date shown; the skill may have changed since (check the version).
- Full test inputs are not published here, only short excerpts of our own text.
- Results on your own texts, languages and domains can differ.

Offer note: Paid in USDC (USD-pegged) over x402 by an AI agent; one-time.
