Write-up: Unauthenticated DoS in Laravel's email rule via Unicode combining-mark ordering (GHSA-cvfq-f547-rv2g)

Summary. A single unauthenticated request can push Laravel's default email validation rule into a denial of service. One crafted address, sent to any public endpoint that validates an email, ties up a server worker for seconds on one request, with no account and before the caller is ever authenticated. It is tracked as GHSA-cvfq-f547-rv2g (Moderate, CVSS 3.1 of 5.3, CWE-400) and is fixed in laravel/framework 12.72.0 and 13.43.0.

The attack at a glance a public form, no login needed Attacker no account, no login Laravel app validates the email first email: a@a tiny field, giant domain cost to validate one email a normal email near-instant a crafted email seconds of CPU, growing with the square of the length A small unauthenticated request makes the server do far more work than it cost to send
A single unauthenticated email field, a few hundred kilobytes at most, reaches Laravel's validator before any login. A normal email is checked almost instantly, but a crafted non-ASCII domain makes the validator spend seconds of CPU, and the cost grows with the square of its length.

Background: how Laravel validates an email

Laravel ships a validator that applications lean on for nearly every form and API endpoint. The rule most of them reach for is the bare email rule, written as 'email' => 'required|email' or the fluent Rule::email().

On its own the rule maps to the RFCValidation mode of the egulias/email-validator package, which parses the address against the email grammar in the relevant RFCs. This is the default on a fresh install, so it is what most public sign-up, contact, newsletter and password-reset forms run.

An email address has a local part before the at sign and a domain part after it. The domain is a sequence of labels separated by dots, and each label has a hard limit of 63 bytes.

When a label is not plain ASCII, it is an internationalised domain name, and turning it into its ASCII form is where the real work happens. On a host that has the intl extension loaded, PHP's idn_to_ascii() is a thin wrapper over the native ICU library, and ICU is where this story goes.

Where one email is validated guest request, before routing and auth Validator email rule egulias RFCValidation DomainPart isLabelTooLong idn_to_ascii native intl ICU normalization a@xn--... normalization runs here, O(n squared) A bare email rule uses egulias RFCValidation by default.
The bare email rule hands the address to the egulias validator, which, while checking that the domain label is not too long, calls idn_to_ascii. On a host with the intl extension that runs native ICU, and ICU normalises the label before it applies the 63-byte limit. All of this happens before the request is routed or authenticated.

Combining marks and canonical ordering

Unicode lets the same visible character be written in more than one way. The letter a with a diaeresis can be a single precomposed code point, U+00E4, or a plain letter a followed by a combining mark, U+0308.

When several marks attach to one base letter, their stored order can differ from their canonical order, so normalization has to sort them. The sort key is the canonical combining class, a small number each mark carries. Marks with a lower class must come first, and the reordering is defined to be stable, so marks that share a class keep their relative order.

The attack uses two marks whose classes are deliberately out of order. U+0300, a combining grave accent, has class 230. U+0316, a combining grave accent below, has class 220.

Written as the pair U+0300 then U+0316, the higher class sits before the lower one, so canonical ordering has to move every below-mark in front of every above-mark. The ordering is defined as repeated swaps of adjacent marks that are out of order, and real implementations insert each mark by scanning back over the ones already placed, so a long run of these pairs costs an amount of work that grows with the square of its length.

Canonical ordering sorts the marks by class accent = class 230 (above), plain = class 220 (below). Below must come first. as written 230 220 230 220 230 220 ... a below-mark is behind an above-mark, so swap it keeps moving left, past every above-mark in order 220 220 220 230 230 230 ... Each below-mark passes every above-mark ahead of it, so the swaps grow with the square of the length
Canonical ordering reorders the marks of a label into order of combining class. A run that alternates class 230 and class 220 is maximally out of order, so every below-mark has to travel past every above-mark ahead of it. The number of swaps, and so the work, grows with the square of the number of marks.

The vulnerability

Put the two halves together. The egulias validator, while checking that a domain label is within the 63-byte limit, calls idn_to_ascii() on the whole label in its DomainPart length check. On a host with the intl extension that call enters native ICU, and ICU normalizes the label before it applies the byte limit.

Normalization runs canonical ordering, and for a label that is a long run of out-of-order combining marks that step is quadratic in the length of the label. The length check that was meant to reject an oversized label ends up doing the most expensive possible work on it first.

The attack, as a C4 container view Attacker [Person] no account Laravel application, trust boundary Public endpoint [Container: route] accepts the request, no login required Validation [Container: Validator] idn_to_ascii then ICU canonical ordering, O(n squared) App logic and auth [Container] only reached after validation passes email:a@a... one worker held about 1.5 s of CPU, before any auth runs never reached The request detonates inside validation, before routing, authentication or any application logic.
A container-level view of the same attack. The crafted request crosses the trust boundary into a public endpoint that needs no login, and the validation container spends the CPU on idn_to_ascii and ICU canonical ordering. Authentication and application logic sit downstream and are never reached, so all of the work happens before the caller is identified.

Nothing in the default configuration stands in the way. The bare email rule reaches RFCValidation with no extra options, so the IDN path is on. A max:255 rule on the same field does not help, because Laravel runs every rule and gathers all of their errors by default, so the email rule still runs unless the field is marked to stop on the first failure with bail.

There is no default rate limit on a guest endpoint, and the request body only has to be a few hundred kilobytes, well inside the sizes a server accepts.

The one real precondition is that the intl extension is loaded so that idn_to_ascii uses native ICU. That is the case on Laravel Herd, on Laravel Sail and on many managed hosts. Where intl is absent the Symfony polyfill is used and that path is linear, so that setup is not affected.

Time to validate, against domain length domain length time combining marks, about 1.5 s precomposed, about 120 ms about 160 KB about 4x the time for each doubling of the length
Two domains of the same byte length cost very different amounts to validate. A precomposed non-ASCII domain is linear and stays in the low hundreds of milliseconds. The crafted combining-mark domain is quadratic, so it reaches about a second and a half at roughly 160 kilobytes and quadruples for each doubling after that.

Proof of concept

Any guest endpoint that validates an email is enough, for example a route that does $request->validate(['email' => 'required|email']). Build a body whose domain is a long run of alternating combining marks, written from code points so the file stays ASCII on disk.

build a crafted body of 40000 mark pairs, about 160 KB
python3 -c 'import sys;n=int(sys.argv[2]);b=(chr(0x300)+chr(0x316))*n;open(sys.argv[1],"wb").write(("{\"email\":\"a@a"+b+"\"}").encode())' /tmp/b.json 40000
send it to a guest endpoint and time the response
curl -s -o /dev/null -w '%{http_code} %{time_total}s\n' -X POST http://127.0.0.1/r -H 'Content-Type: application/json' --data-binary @/tmp/b.json
What the two commands do, as a sequence attacker (curl) Laravel app, one PHP worker build body: 40000 mark pairs about 160 KB, ASCII on disk POST /r {"email":"a@a..."} Content-Type: application/json server CPU busy about 1.5 s: ICU canonical ordering, O(n squared) HTTP response, time_total about 1.5 s One request, one worker, about 1.5 s of CPU, and it quadruples each time the body doubles
The two commands as an exchange. One curl POST carries the crafted body to a guest endpoint, a single PHP worker spends about a second and a half of CPU in ICU canonical ordering, and the response comes back with a time_total of about the same. One request, one worker, and the cost quadruples each time the body length doubles.

On the reporter's machine, a Mac Studio with an M3 Ultra, the 160 KB body takes about a second and a half of CPU in a single request, and the time rises about fourfold for each doubling of the input. A precomposed domain of the same byte length, built from U+00E4 instead of combining marks, validates in about 120 milliseconds, which is the linear baseline the quadratic path is measured against.

Impact

One crafted request ties up one PHP worker for the full length of the validation. Because the cost is quadratic, a larger body buys far more than its size suggests. On the same machine, a body of about 520 kilobytes runs for roughly fifteen seconds and then that one request returns a 500 from an out-of-memory in doctrine/lexer at the default memory_limit of 128 megabytes, and a one megabyte value runs for roughly fifty-five seconds at a common production memory_limit of 512 megabytes.

A PHP-FPM pool serves a fixed number of workers. Each of these requests holds one worker for the duration, so a client only needs about as many requests in flight as the pool has workers to leave none free for real traffic. That is a trickle, not a flood, and it is reachable with no account on any public endpoint that validates an email.

One request holds one PHP worker for about a second and a half PHP-FPM workers about one request per worker busies them all every worker busy while the attack runs real traffic has to wait for a free worker The workers free up within a couple of seconds after the attack stops. A request timeout, a smaller body limit, or rate limiting bound how long they stay busy. Each worker answers many small requests and stays free About one crafted request per worker ties them all up Stop the attack and the workers free up within a couple of seconds
Each crafted request holds one PHP-FPM worker for the length of the validation, so only about as many requests as the pool has workers are needed to busy them all and make real traffic wait. The effect lasts while the attack runs, and the workers free up within a couple of seconds after it stops. A request timeout, a smaller body limit, or rate limiting all bound it.

It is rated Moderate, CVSS 3.1 of 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), classed as CWE-400, and the underlying pattern is the inefficient algorithmic complexity of CWE-407. No data is read or changed, so the impact is availability only, and the pool recovers on its own once the traffic stops.

The fix

The fix, in laravel/framework 12.72.0 and 13.43.0, enforces the overall address limit from RFC 5321 before the address reaches the egulias validator. An email address may be at most 254 characters, so the email rule now rejects anything longer up front, and a crafted domain of hundreds of kilobytes never reaches the IDN path. The expensive normalization step is simply never entered for an input that the standard already forbids.

The fix: reject over-length addresses before the IDN path email rule max 254 chars RFC 5321 IDN normalization never reached a@a + 200 KB rejected in microseconds, 422
The patched email rule applies the RFC 5321 limit of 254 characters before anything hands the address to the IDN path, so an over-length crafted domain is turned away at once and the quadratic normalization never runs.

Remediation

Upgrade to laravel/framework 12.72.0 or 13.43.0 or later, which carries the fix. On an application that cannot upgrade at once, two measures help.

Put a length rule before the email rule and stop on the first failure, for example 'email' => 'bail|max:254|email', so an over-length value is rejected before the email rule runs. Rate limiting on the public endpoints that validate an email, and a request timeout at the web server or PHP-FPM level, both cap how much work any one client can ask for.

Because the cost is quadratic in the length, a smaller body or field limit is a disproportionately effective control.

Disclosure and acknowledgements

This was a coordinated disclosure to the Laravel security team, and the handling was prompt and professional throughout. Andrei Agape, a security engineer on the team, acknowledged the report within a week and brought it to the maintainers to confirm.

Mior Muhammad Zaki prepared the fix, which Taylor Otwell merged, and it shipped in the next patch releases of both supported lines. My thanks to all of them for a clear, respectful process and a quick turnaround from report to release.

Timeline

timeline
2026-10-22: reported privately to the Laravel security team
2026-10-29: Andrei Agape confirmed it looked like an issue and asked the dev team to verify
2026-11-07: fix merged in pull request 62347
2026-11-10: fix released in laravel/framework 12.72.0 and 13.43.0
2026-11-18: advisory GHSA-cvfq-f547-rv2g published
2026-11-26: this write-up published

References

The SVG illustrations in this write-up were produced with the help of Claude.