The APP13 polyglot behind a YOOtheme web shell
CVE-2026-102785 is a file-write vulnerability that becomes an execution problem because of how the written file is constructed. Unit 42 described a JPEG/PHP polyglot with PHP code inside the APP13 metadata segment. The object can look like a valid image to a parser while the PHP interpreter treats the metadata as executable code.
The flaw affects YOOtheme Pro 5.0.0 through 5.0.52. The vendor fixed it in 5.0.53. The vulnerable image handler does not fully bind the normalized image operations and the output destination to the request signature. An unauthenticated attacker can reuse a signed public image URL, add FromFile=php://input, and save the request body into a media path with a PHP suffix.
Why a JPEG parser is not a security boundary
JPEG permits application-specific metadata segments. APP13 can carry information that is not part of the visible image. If the file remains structurally valid, an image library may accept it while the server still sends it to PHP because the filename ends in .php. The image check and the execution decision use different representations of the same file.
That difference is the polyglot property. Unit 42 stated that the PHP in APP13 survived image re-encoding. A pipeline that opens and rewrites the image can therefore preserve the hidden code instead of stripping it. The file does not merely pass a superficial magic-byte check; it carries executable content through the metadata that the image code chooses to retain.
The server may return HTTP 500 even though the file is written. The application could fail after the transformation or while constructing a response. The status code reflects the end of the request, not an atomic commit of every filesystem operation.
Detection implications
A search for .php files in an uploads directory remains useful, but it should not be the only check. Inspect files that appear to be images, especially JPEG files created near suspicious image-handler requests. Search for PHP markers in APP13 metadata, and compare file creation times with requests containing FromFile=php://input and Save=.
Unit 42's first-stage filename pattern is yt[0-9a-f]{7}.php under wp-content/uploads/. The same activity can leave an ALFA_DATA directory and the WPCONFIG response marker. Those artifacts are not generic signatures for every exploitation attempt, but they provide concrete starting points for a focused hunt.
Process telemetry can distinguish a suspicious file from executed code. Look for the web-server account launching command shells, especially cmd.exe /s /c on a Windows target. A validation command may contain a random YTS marker followed by id. The marker changes between drops, so a fixed string is less useful than the process parent-child relationship and timing.
Remediation that accounts for the file
Patch to 5.0.53 or later, but treat the update as a boundary in time, not a cleanup tool. Review every upload created while an affected version was running. Preserve suspicious files and logs before deletion. If an image metadata check finds PHP, treat the host as potentially compromised until execution evidence is ruled out.
Rotate database, administrator, deployment, and API credentials that the web application could access. Check for outbound activity and additional persistence. A valid JPEG with hidden PHP is enough to explain execution, but the responder still needs to establish what ran after the shell opened.
Exposure context
ZoomEye returned 34,682 pages for http.body="YOOtheme" and zero exact CVE matches. This is a broad product-string count, not a confirmed victim count. It can help identify candidate sites, while version checks and file-level evidence determine whether CVE-2026-102785 applies.
The APP13 detail is a reminder that validation must follow the same path as execution. If the web server decides to run a file because of its suffix, an image parser's approval does not make the file safe.
Top comments (0)