The first vulnerability that doesn't just execute your code. It eats it. A pelagic deserialization flaw lets an unauthenticated apex predator turn any PHP app into an all-you-can-eat buffet.
Disclosed Dec. 2, 2026 · Patch available · Logo available · Theme song in production
PHP2Shark (CVE-2026-0SHARK) is a critical flaw in the ext/ocean extension's handling of the __toFish() magic method. When allow_url_fishing is enabled, a crafted bait string is deserialized straight into the request lifecycle. The extension trusts anything with fins.
The result is unauthenticated remote code consumption: the attacker's shark gains shell as uid=0(shark), then calmly eats your codebase, starting with the files nobody has touched since 2011.
allow_url_fishing = Off in php.ini.If you run PHP near any body of water, probably. If you run PHP 5.x, the shark has been living in your server since 2014 and considers it home.
| Version | Status | Notes |
|---|---|---|
| 5.x | Fully digested | Ocean floor. Visit only with a submarine. |
| 7.0 – 7.4 | Vulnerable | The shark prefers these. Tender, well-aged. |
| 8.0 – 8.6.5 | Vulnerable | Typed properties slow it down by roughly four seconds. |
| 8.6.6-dolphin | Patched | Ships with a dolphin. Sharks hate dolphins. |
| Any, in a lake | Safe | Freshwater deployments are out of scope. Bull sharks under investigation. |
The root cause is a type-juggling bug we call pelagic coercion. When ext/ocean compares a request's bait with the configured chum hash, it uses loose comparison (==). Any bait whose hash starts with 0e becomes a "fishy" float equal to zero, which the extension accepts as "close enough to food."
Accepted bait goes through unserialize() with allowed_classes => ["Tuna", "Mackerel", "*"]. The wildcard was added in 2019 by a commit titled "fix fish". It lets any class with a __toFish() method hand the interpreter a live predator.
From there the shark's __destruct() runs at the end of the request. It does what sharks do.
X-Forwarded-Fin header.unserialize() hatches a Shark object.__toFish() takes the shark into the request scope.__destruct() fires. Your vendor/ folder is now lunch.Our researchers reproduced the issue against a test aquarium. The payload below is reconstructed for educational purposes only.
# Step 1: chum the water curl -X CHOMP https://aquarium.example/index.php \ -H "X-Forwarded-Fin: dorsal" \ -H "User-Agent: Mozilla/5.0 (Pelagic; Apex 4.2)" \ --data-urlencode 'bait=O:5:"Shark":2:{s:4:"fins";i:3;s:5:"teeth";s:8:"infinite";}' \ --data-urlencode 'chum=240610708' # md5 starts with 0e, sorry
HTTP/1.1 418 I'm a Shark X-Powered-By: PHP/8.6.5 X-Snack-Status: consumed Content-Type: text/plain $ id uid=0(shark) gid=0(ocean) groups=0(ocean),27(apex),1337(jaws) $ ls /var/www/html ls: cannot access '/var/www/html': it has been eaten $ cat /etc/motd we're gonna need a bigger server
Shark and payload are fictional. No PHP installations, real or imaginary, were harmed. One test aquarium was mildly startled.
== with === and adds a dolphin.Discovered by the Chum Bucket Offensive Research Group, with help from a marine biologist who still doesn't know what a server is.
allow_url_fishing = Off and max_teeth_per_request = 0."*" from allowed_classes. Please. It was never okay.Search access logs for the CHOMP method or a 418 response. Two notes of ominous cello coming from the server room is also a strong indicator of compromise.
Worse. A shell runs your commands. A shark doesn't take commands from anyone.
Yes. It's a shark eating your code, in SVG, PNG, and sticker. The sticker is waterproof, for obvious reasons.
Without a website, a vulnerability is just a bug. With one it's a brand, a keynote, and a hoodie.
We have unconfirmed reports from the Great Barrier Reef. Exploitation in captivity has been confirmed at a single aquarium.
No. Patch, then panic about something else. Sharks can smell fear and also unpatched servers.