Pwning 15M+ Systems by Renaming a Song: From a CMS Audit to an Upstream RCE in getID3…
The getID3 PHP library built a shell command for the Windows vorbiscomment helper by pasting the user-supplied media filename into the command string without escaping it. An attacker who could upload a file with a crafted name could run arbitrary commands on the server.
Published on medium.com
Cve
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
ClassicPress is an open-source fork of WordPress. Like WordPress, it ships a media library that accepts audio and video uploads, and it bundles third-party PHP libraries directly in its core codebase. One of those libraries is getID3, the long-standing PHP library for reading and writing multimedia metadata across more than 30 audio and video formats (MP3, OGG, FLAC, WAV, MP4, AVI and others).
When a user uploads an .mp3, .ogg or .flac file, getID3 runs in the background to extract metadata such as bitrate, duration and album art, and can optionally write tags back into the file. For Ogg/Vorbis files, getID3's tag-writing modules shell out to vorbiscomment, an external command-line binary that edits the Vorbis comment tags inside .ogg files. That shell-out is where the vulnerability lives.
The bug is CVE-2026-94106, rated CVSS 3.1 8.8 (High) with the vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, classified as CWE-78 (OS Command Injection), affecting getID3 versions before 1.9.26. The report cites over 14.7 million Composer downloads in one place and over 15 million in another.
Setup
The finding came out of a source code audit of ClassicPress, not from fuzzing. The relevant preconditions for exploitation, as described in the report, are:
- The application allows user-controlled filenames.
- Those filenames reach getID3's tag-writing functions.
- The application runs on Windows, so the
vorbiscomment.execode path is taken, with getID3 below 1.9.26.
In ClassicPress and WordPress, the Author role is sufficient to upload media, so an attacker only needs that level of access. The proof of concept itself was run on a local Linux machine, replicating the exact command line that getID3's Windows branch generates (the cmd.exe-style double-quote concatenation) rather than on a Windows host.
Finding it
The researcher was reviewing how ClassicPress handles media file uploads when the bundled getID3 library stood out. The initial report went to the ClassicPress security team on 4 September 2026, describing what appeared to be a command injection in their bundled copy. The maintainer @mattyrob responded the same day, acknowledged the report, and pointed out that the code was not ClassicPress-specific:
"getID3 is an external package that is used within ClassicPress (and likely other software solutions) and this code as indicated seems to be present in the most recent version."

That reply reframed the issue: ClassicPress had faithfully bundled the upstream library, and the bug was in getID3 itself, so every project depending on getID3 was potentially affected.

me reading the comment
Reading getid3/getid3.php around line 1816, the researcher found the function that builds the vorbiscomment shell command. It has two branches, one for Windows and one for Linux, and the difference between them is the whole bug.
The Windows branch:
$commandline = '"' . GETID3_HELPERAPPSDIR . 'vorbiscomment.exe" -w -c "' . $empty . '" "' . $file . '" "' . $temp . '"';
The Linux branch:
// ============================================================// LINUX PATH (SAFE) // ============================================================$commandline = 'vorbiscomment -w -c ' . escapeshellarg($empty) . ' ' . escapeshellarg($file) . ' ' // <-- same $file, but properly escaped . escapeshellarg($temp) . ' 2>&1';
The Linux branch applies escapeshellarg() to all three arguments. The Windows branch uses raw string concatenation with manual double-quotes, and $file, which originates from the uploaded media filename, is pasted directly into the shell command. That is textbook CWE-78.

Tracing the data flow confirmed the input reaches the shell untouched:
User uploads file → filename stored as string → passed to getID3 tag-writing API as $this->filename → assigned to $file in the shell command builder → concatenated raw into $commandline → executed via shell_exec($commandline)
There is no sanitisation at any point in that chain; the filename travels from the HTTP request to shell_exec() intact.

The same pattern appears in getid3/write.vorbiscomment.php around lines 85 to 110, a parallel implementation of the same shell-out with the same missing escapeshellarg() on the Windows branch:
$commandline = GETID3_HELPERAPPSDIR . 'vorbiscomment.exe -w --raw -c "' . $tempcommentsfilename . '" "' . $this->filename . '" 2>&1';
$VorbiscommentError = shell_exec($commandline);
The same bug was also found in getid3/module.audio.shorten.php; the fix commit also patched write.metaflac.php. The vulnerability had been sitting in the codebase in plain sight for years.
Exploitation
Step 1: Understand why double-quoting is not enough
Wrapping a variable in double quotes handles spaces in filenames, but it does not handle the double-quote character itself. In Windows cmd.exe and in Linux sh/bash, double-quoted strings still respect certain special characters. If the injected string contains a ", the quote closes early and everything after it is interpreted as raw shell syntax.
For a normal filename, the intended command looks like this:
"vorbiscomment.exe" -w -c "C:\tmp\tags.txt" "C:\uploads\song.ogg" "C:\tmp\out.ogg"
Step 2: Craft the filename
A user-supplied filename of:
song.ogg" & whoami > C:\inetpub\wwwroot\pwned.txt & echo "
produces this command:
"vorbiscomment.exe" -w -c "C:\tmp\tags.txt" "C:\uploads\song.ogg" & whoami > C:\inetpub\wwwroot\pwned.txt & echo "" "C:\tmp\out.ogg"
Windows cmd.exe parses that as three commands chained with &:
"vorbiscomment.exe" -w -c "..." "..."runs vorbiscomment, which may fail on a non-Vorbis file, and that does not matter.whoami > C:\inetpub\wwwroot\pwned.txtexecutes the arbitrary command and writes its output to a web-accessible file.echo "" "..."cleans up.
The critical point is that the injected command runs regardless of whether vorbiscomment.exe succeeds. The separator (& on Windows, ; on Linux) means "run the next command no matter what", so even if vorbiscomment exits with an error because it cannot parse the file, the payload has already fired.
Step 3: Reproduce the vulnerable command line
To verify the vulnerability, the researcher constructed the exact command line that getID3's Windows branch generates, replicating the cmd.exe-style double-quote concatenation, and ran the vulnerable and safe versions side by side on a local Linux machine.
The payload injected into the filename:
/tmp/audio"; id > /tmp/rce_confirmed; echo "x
The vulnerable command, replicating the Windows branch with raw string concatenation and no escaping:
"vorbiscomment" -w -c "/tmp/test_empty" "/tmp/audio"; id > /tmp/rce_confirmed; echo "x" "/tmp/test_temp"
What the shell sees:
"vorbiscomment" -w -c "/tmp/test_empty" "/tmp/audio"runs vorbiscomment, which fails or succeeds, and it does not matter.;is a separator that runs the next command unconditionally.id > /tmp/rce_confirmedis the payload executing.;is another separator.echo "x" "/tmp/test_temp"cleans up and absorbs the trailing quote.
The result confirmed RCE:
uid=1000(shaik) gid=1000(shaik) groups=1000(shaik),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),100(users),989(ollama)
The id command ran and wrote its output to /tmp/rce_confirmed.

Step 4: Run the control case
The safe command, replicating the Linux branch with escapeshellarg():
vorbiscomment -w -c '/tmp/test_empty' '/tmp/audio"; id > /tmp/rce_confirmed; echo "x' '/tmp/test_temp' 2>&1
escapeshellarg() wraps the entire malicious filename in single quotes, so the shell treats it as one literal argument and interprets no metacharacters. vorbiscomment receives the full string as a filename, finds no such file and exits with an error. No command injection occurs, and the control case holds.
Step 5: The attack path in the wild
1. Attacker holds Author role (sufficient to upload media in ClassicPress/WordPress)2. Attacker crafts a filename containing shell metacharacters: mysong.ogg" & powershell -enc <base64_payload> & echo "3. File is uploaded — getID34. Windows branch builds the unescaped command line and calls shell_exec()5. cmd.exe processes the string and executes the injected commands6. Attacker gets RCE as the web server/PHP process user7. From there: read wp-config.php, drop a webshell, pivot internally
Root cause
The mistake is the asymmetry between the two platform branches in the same file. The Linux branch passes every argument through escapeshellarg(); the Windows branch builds the command by concatenating raw strings with manual double-quotes and passes the user-controlled filename straight into shell_exec(). Double quotes handle spaces but not the quote character itself, so a " in the filename closes the quoted argument and the rest of the string is parsed as shell syntax. The same omission appears in write.vorbiscomment.php and module.audio.shorten.php.
No existing defence stopped it: there is no sanitisation between the HTTP request and shell_exec(), and the failure of the preceding vorbiscomment invocation does not prevent the injected command from running because the separator runs the next command unconditionally.
Impact
An attacker with file upload access, which in ClassicPress and WordPress means the Author role, can execute arbitrary commands on a Windows host running getID3 below 1.9.26, as the web server or PHP process user. From there the report lists reading wp-config.php, dropping a webshell and pivoting internally.
Affected are any PHP applications that allow user-controlled filenames, pass them to getID3's tag-writing functions, and run on Windows with the vorbiscomment.exe path and getID3 below 1.9.26. That includes ClassicPress, which bundles getID3 in every installation, any PHP media management application using james-heinrich/getid3 below 1.9.26 via Composer, and custom file-handling platforms built on getID3. The report cites over 14.7 million Composer downloads in one place and over 15 million in another, not counting direct downloads, Git clones or vendored copies.
Fix
The fix applies escapeshellarg() to every variable that goes into a shell command, with no exceptions and no platform conditionals.
Before, in getid3.php:
$commandline = '"' . GETID3_HELPERAPPSDIR . 'vorbiscomment.exe" -w -c "' . $empty . '" "' . $file . '" "' . $temp . '"';
Before, in write.vorbiscomment.php:
$commandline = GETID3_HELPERAPPSDIR . 'vorbiscomment.exe -w --raw -c "' . $tempcommentsfilename . '" "' . $this->filename . '" 2>&1';
After, in v1.9.26:
$commandline = escapeshellarg(GETID3_HELPERAPPSDIR . 'vorbiscomment.exe') . ' -w -c ' . escapeshellarg($empty) . ' ' . escapeshellarg($file) . ' ' . escapeshellarg($temp);
$commandline = 'vorbiscomment -w --raw -c ' . escapeshellarg($tempcommentsfilename) . ' ' . escapeshellarg($this->filename) . ' 2>&1';
escapeshellarg() wraps the whole argument in single quotes, and in POSIX shells nothing inside single quotes is interpreted: no variables, no command substitution, no metacharacters. A literal single quote inside the value is escaped as '\''. On Windows, PHP's escapeshellarg() wraps in double quotes and escapes internal double quotes as "", the cmd.exe convention.
The timeline of the fix:
- 4 September 2026: private advisory filed to ClassicPress via GitHub;
@mattyrobresponded the same day and redirected the report to the upstream package. - 4 to 5 September 2026: getID3 had no
SECURITY.mdand no private vulnerability reporting on GitHub, so the researcher contacted maintainer James Heinrich through available channels, suggested a private disclosure channel, and opened Issue #503 to start the conversation publicly. - 5 September 2026: two commits landed, 2c6f3f9 patching
getid3.phpand ce598c4 patchingwrite.vorbiscomment.php,write.metaflac.phpandmodule.audio.shorten.php. - 8 September 2026: ClassicPress merged PR #2680 into core once the upstream release was tagged.
- 21 September 2026: the CVE was assigned through VulnCheck CNA as CVE-2026-94106, OS Command Injection via unescaped filenames in getID3 below 1.9.26.
For developers, the report's guidance is to never build shell commands by string concatenation, to use escapeshellarg() on every variable that touches a command string even when the input is believed to be controlled, and where possible to replace shell-exec patterns with proc_open() using array-based argument lists, which bypass the shell interpreter entirely. Platform branches should be kept in sync, because asymmetry between them is where bugs hide, and projects should publish a SECURITY.md with private reporting.
Variants to test
- Other platform branches in the same library. Grep for
shell_exec,exec,systemandpopenand compare the Windows and POSIX paths argument by argument. A positive result is one branch usingescapeshellarg()and the other concatenating a variable raw. - Other getID3 shell-outs. The fix commit also patched
write.metaflac.phpandmodule.audio.shorten.php. Check whether any other helper binary invocation passes a filename or tag value unescaped. A positive result is a command line where a user-controlled value sits inside quotes withoutescapeshellarg(). - Filename metacharacters on Windows. Upload a file whose name contains
"followed by&and a harmless command such aswhoami, then look for the output in a web-accessible path. A positive result is the command's output appearing where the payload wrote it, even when the helper binary itself errors. - Filename metacharacters on Linux. Try
;,$()and backticks inside a filename that reaches a shell-out. A positive result is execution of the injected command, or a filename arriving at the binary split into multiple arguments. - Downstream consumers of the library. Check whether the CMS or application passes the original upload filename, rather than a sanitised or generated one, into the metadata-writing API. A positive result is the raw client-supplied name reaching the tag-writing function.
- Role requirements. Test with the lowest role that can upload media (Author in ClassicPress and WordPress). A positive result is a successful upload and shell execution without administrative rights.
- Control case. Run the same payload against a build with
escapeshellarg()applied and confirm the string is treated as one literal argument. A positive result for the fix is the binary receiving the full malicious string as a filename and no injected command running.
What happened, in plain words
Imagine a website that lets you upload a song. When the file arrives, the website opens it and reads the little label inside: the song title, the artist, how long it plays. That label is called metadata, and it is what makes your music player show a name instead of a meaningless file name.
Now imagine that the website, to read or change that label, hands the file name to a helper program on the server. If the website passes the file name along without checking it, and you name your file something clever instead of song.ogg, the server can end up treating part of your file name as an instruction to run. That is the whole bug: a file name that is really a command.
The library with the bug is called getID3. It is a piece of PHP code (PHP is a programming language many websites are built with) that millions of sites use to read audio and video metadata. The bug is tracked as CVE-2026-94106, rated CVSS 8.8 (High), classified as CWE-78 (OS Command Injection), and it affects getID3 versions before 1.9.26. The report cites over 14.7 million Composer downloads in one place and over 15 million in another.
The fix turned out to be one function call, escapeshellarg(), which was already being used on the Linux side of the same file. The Windows side simply did not use it.
1. How it started: a CMS bug report
This was not found by a machine throwing random inputs at a website. It was found by reading code.
ClassicPress is an open-source fork of WordPress. A fork is a copy of a project that someone takes and continues separately. Like WordPress, ClassicPress has a media library where users upload pictures, audio and video. It also bundles several third-party PHP libraries directly inside its own code, the way a kitchen might keep a set of shared tools in one drawer rather than sending you to the shop each time.
One of those bundled libraries is getID3, and it caught the researcher's eye while reviewing how ClassicPress handles media uploads. The first report went to the ClassicPress security team on 4 September 2026, describing what looked like a command injection in their bundled copy. The maintainer @mattyrob replied the same day, acknowledged the report, and made a crucial point:
"getID3 is an external package that is used within ClassicPress (and likely other software solutions) and this code as indicated seems to be present in the most recent version."

That reply changed the shape of the whole thing. ClassicPress had not written the buggy code; it had copied the upstream library faithfully, and the bug was in getID3 itself. Upstream here means the original project that everyone else copies from. So every project using getID3 was potentially affected, not just ClassicPress but the whole ecosystem of PHP applications that depend on it.

me reading the comment
2. What is getID3?
getID3 is one of the oldest and most battle-tested PHP libraries for multimedia metadata. It can read and write metadata for over 30 audio and video formats: MP3, OGG, FLAC, WAV, MP4, AVI and dozens more.
It is not a niche library. It sits deep inside the PHP ecosystem:
- It is bundled into WordPress core under
wp-includes/ID3/, which makes it present on hundreds of millions of websites. - It has been downloaded over 14.7 million times via Composer. Composer is PHP's package manager, a tool that fetches libraries for you, like an app store for code.
- It is used by Joomla, Drupal, TYPO3 and countless custom PHP media applications.
- It is part of the default stack for any PHP application that handles audio or video uploads.
When you use the WordPress or ClassicPress media library to upload an .mp3, .ogg or .flac file, getID3 runs in the background to extract metadata such as bitrate, duration and album art, and it can optionally write tags back into the file. A tag is a labelled field inside the file, such as the artist name.
3. Finding the real root cause: code review
The journey from "ClassicPress bug" to "upstream supply-chain vulnerability" came down to careful source code reading. Supply chain here means the chain of projects that depend on each other: if a library deep in the chain is broken, everything above it inherits the problem.
Starting point: the media upload pipeline
When a user uploads an audio file in ClassicPress, the platform calls into getID3's writing modules to handle metadata. For Ogg/Vorbis files specifically, getID3 needs to invoke vorbiscomment, an external command-line binary that actually edits the Vorbis comment tags inside .ogg files. A binary is a ready-to-run program. Ogg/Vorbis is an audio format, and its comment tags are the metadata fields inside it.
This happens inside getid3/getid3.php and getid3/write.vorbiscomment.php.
The code review that found the bug
Opening getid3/getid3.php around line 1816, the researcher found a function that builds the shell command for vorbiscomment. A shell is the program that takes typed commands and runs them; a shell command is one such instruction. There are two branches in this code: one for Windows, one for Linux.
The Windows branch:
$commandline = '"' . GETID3_HELPERAPPSDIR . 'vorbiscomment.exe" -w -c "' . $empty . '" "' . $file . '" "' . $temp . '"';
Line by line, in plain words:
$commandline =starts building a piece of text that will later be handed to the shell. The$marks a variable, a named box holding a value.'"'is a literal double-quote character, added first.. GETID3_HELPERAPPSDIR .glues on the folder where helper programs live.'vorbiscomment.exe" -w -c "'glues on the program name and its options.-wmeans write,-cmeans a comment file follows.. $empty .glues on the name of an empty comment file.'" "'glues on a closing quote, a space and an opening quote, so the next value sits inside quotes.. $file .glues on the file name. This is the value that comes from the uploaded file's name.'" "'again closes and reopens quotes.. $temp .glues on a temporary output file name.'"'closes the final quote.
The important part is $file: it is dropped into the text with nothing around it except quote characters that the code itself typed.
The Linux branch:
// ============================================================// LINUX PATH (SAFE) // ============================================================$commandline = 'vorbiscomment -w -c ' . escapeshellarg($empty) . ' ' . escapeshellarg($file) . ' ' // <-- same $file, but properly escaped . escapeshellarg($temp) . ' 2>&1';
Line by line:
- The comment lines mark this as the Linux path and label it safe.
$commandline = 'vorbiscomment -w -c 'starts the command text with the program name and options.. escapeshellarg($empty) .passes the empty comment file throughescapeshellarg(). That function wraps a value so the shell treats it as plain text, never as an instruction.. escapeshellarg($file) .does the same for the file name, with a comment noting it is the same$filebut properly escaped.. escapeshellarg($temp) .does the same for the temporary file.' 2>&1'adds a redirection that sends error output to the same place as normal output, so errors are captured.
The asymmetry is jarring. Whoever wrote the Linux branch clearly understood the danger and used escapeshellarg() on all three arguments. The Windows branch did not. It uses raw string concatenation, meaning it glues text together directly, with manual double-quotes. $file, which comes from the uploaded media file name, is pasted straight into the shell command. That is textbook CWE-78, the official label for OS command injection: user input reaching the operating system's command interpreter.

Tracing the data flow
To confirm this was exploitable end to end, the researcher traced where $file comes from:
User uploads file → filename stored as string → passed to getID3 tag-writing API as $this->filename → assigned to $file in the shell command builder → concatenated raw into $commandline → executed via shell_exec($commandline)
Reading that chain in plain words:
- A user uploads a file. The file name is kept as a piece of text.
- That text is passed to getID3's tag-writing API. An API is the agreed way one piece of software asks another to do something, like a service counter with defined forms.
- Inside getID3 it becomes
$this->filename, the object's own record of the file name. - It is assigned to
$filein the code that builds the shell command. - It is concatenated raw into
$commandline, meaning glued in with no cleaning. - Finally
shell_exec($commandline)runs the text as a shell command.shell_execis a PHP function that hands a string to the shell and returns what the command prints.
There is no sanitisation at any point in that chain. Sanitisation means cleaning input so dangerous characters lose their power. The file name travels from the HTTP request to shell_exec() intact. HTTP is the protocol browsers and servers use to exchange pages and uploads.

The same bug in write.vorbiscomment.php
The same pattern appears in getid3/write.vorbiscomment.php around lines 85 to 110, a parallel implementation of the same shell-out, with the same missing escapeshellarg() on the Windows branch:
$commandline = GETID3_HELPERAPPSDIR . 'vorbiscomment.exe -w --raw -c "' . $tempcommentsfilename . '" "' . $this->filename . '" 2>&1';
Line by line:
$commandline = GETID3_HELPERAPPSDIRstarts with the helper program folder.. 'vorbiscomment.exe -w --raw -c "'adds the program name, the write option, a raw option and an opening quote.. $tempcommentsfilename .adds the temporary comments file name.'" "'closes the quote, adds a space and opens a new quote.. $this->filename .adds the uploaded file's name, again with no escaping.'" 2>&1'closes the quote and redirects errors into normal output.
$VorbiscommentError = shell_exec($commandline);
This line runs the assembled text through the shell and stores whatever comes back in $VorbiscommentError.
The same bug was also found in getid3/module.audio.shorten.php; the fix commit also patched write.metaflac.php. The vulnerability had been sitting in the codebase in plain sight for years.
4. The vulnerability explained
Why double-quoting is not sufficient
Many developers believe that wrapping a variable in double quotes inside a shell command makes it safe. It does handle spaces in file names, because the shell keeps a quoted chunk together as one piece. But it does not handle the double-quote character itself.
In Windows cmd.exe and in Linux sh/bash, double-quoted strings still respect certain special characters. If the injected string contains a ", the quote closes early, and everything after it is interpreted as raw shell syntax. Think of quotes as a fence around a value: if the value itself contains a gate, the fence no longer keeps anything in.
For a normal file name, the intended command looks like this:
"vorbiscomment.exe" -w -c "C:\tmp\tags.txt" "C:\uploads\song.ogg" "C:\tmp\out.ogg"
Line by line:
"vorbiscomment.exe"is the helper program, quoted in case its path contains spaces.-wtells it to write tags.-c "C:\tmp\tags.txt"points at the file holding the comments to write."C:\uploads\song.ogg"is the audio file being edited."C:\tmp\out.ogg"is where the result goes.
Crafting the file name
Now imagine the user-supplied file name is:
song.ogg" & whoami > C:\inetpub\wwwroot\pwned.txt & echo "
Line by line:
song.ogglooks like an ordinary file name at the start."closes the quote the program opened, ending the argument early.&is a command separator incmd.exe: run what comes next as a separate command.whoamiis a harmless Windows command that prints the name of the account running it.>redirects that output into a file instead of the screen.C:\inetpub\wwwroot\pwned.txtis a path inside a web server's public folder, so the output can later be fetched with a browser.& echo "starts another command and leaves a quote to balance the one the program will add at the end.
The actual command that gets executed becomes:
"vorbiscomment.exe" -w -c "C:\tmp\tags.txt" "C:\uploads\song.ogg" & whoami > C:\inetpub\wwwroot\pwned.txt & echo "" "C:\tmp\out.ogg"
Line by line:
"vorbiscomment.exe" -w -c "C:\tmp\tags.txt" "C:\uploads\song.ogg"is the original command, now cut short at the injected quote.&ends that command and starts the next.whoami > C:\inetpub\wwwroot\pwned.txtruns the attacker's command and saves its output in a public folder.&starts the final command.echo "" "C:\tmp\out.ogg"prints some text and absorbs the leftover quote and the original trailing argument, so the whole line stays syntactically valid.
Windows cmd.exe parses that as three commands chained with &:
"vorbiscomment.exe" -w -c "..." "..."runs vorbiscomment, which may fail on a non-Vorbis file, and that does not matter.whoami > C:\inetpub\wwwroot\pwned.txtexecutes the arbitrary command and writes its output to a web-accessible file.echo "" "..."cleans up.
The critical point: failure does not stop the payload
The injected command runs regardless of whether vorbiscomment.exe succeeds. The separator (& on Windows, ; on Linux) means "run the next command no matter what". Even if vorbiscomment exits with an error because it cannot parse the file, the attacker's payload has already fired. Think of a shopping list where one item says "and buy milk": even if the first shop is closed, you still go for the milk.
5. Proof of concept
Environment
To verify the vulnerability, the researcher constructed the exact command line that getID3's Windows branch generates, replicating the cmd.exe-style double-quote concatenation, and ran both the vulnerable and the safe versions side by side on a local Linux machine to prove the injection. A proof of concept is a small, controlled demonstration that a bug is real.
The payload injected into the file name:
/tmp/audio"; id > /tmp/rce_confirmed; echo "x
Line by line:
/tmp/audiois the start of an ordinary file path."closes the quote early.;is the Linux shell's command separator.idis a harmless command that prints the current user and groups.>sends that output into a file./tmp/rce_confirmedis where the proof is saved.;separates again.echo "xstarts a final command and leaves a quote open, to be closed by the program's own trailing quote.
The vulnerable command, replicating the Windows branch with raw string concatenation and no escaping:
"vorbiscomment" -w -c "/tmp/test_empty" "/tmp/audio"; id > /tmp/rce_confirmed; echo "x" "/tmp/test_temp"
Line by line:
"vorbiscomment" -w -c "/tmp/test_empty" "/tmp/audio"is the intended command, cut short by the injected quote.;ends it and starts the next command unconditionally.id > /tmp/rce_confirmedruns the attacker's command and saves the output.;starts the last command.echo "x" "/tmp/test_temp"prints text and absorbs the leftover quote and the original trailing argument.
What the shell sees:
"vorbiscomment" -w -c "/tmp/test_empty" "/tmp/audio"runs vorbiscomment, which fails or succeeds, and it does not matter.;is a separator that runs the next command unconditionally.id > /tmp/rce_confirmedis the payload executing.;is another separator.echo "x" "/tmp/test_temp"cleans up and absorbs the trailing quote.
The result confirmed RCE. RCE stands for remote code execution: an attacker somewhere else gets their own commands to run on the server.
uid=1000(shaik) gid=1000(shaik) groups=1000(shaik),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),100(users),989(ollama)
Line by line:
uid=1000(shaik)is the numeric user ID and account name of the user the command ran as.gid=1000(shaik)is the primary group ID and name.groups=...lists every group the account belongs to, such assudo(administrator rights) andplugdev(device access).
The id command ran and wrote its output to /tmp/rce_confirmed. Command injection confirmed.

The control case
The safe command, replicating the Linux branch with escapeshellarg():
vorbiscomment -w -c '/tmp/test_empty' '/tmp/audio"; id > /tmp/rce_confirmed; echo "x' '/tmp/test_temp' 2>&1
Line by line:
vorbiscomment -w -cis the same helper program with the same options.'/tmp/test_empty'is the comment file, wrapped in single quotes.'/tmp/audio"; id > /tmp/rce_confirmed; echo "x'is the entire malicious file name, wrapped in single quotes as one piece. Inside single quotes the shell treats every character as plain text, so the;,>and"lose their meaning.'/tmp/test_temp'is the output file, also quoted.2>&1sends errors to the same place as normal output.
escapeshellarg() wraps the entire malicious file name in single quotes, so the shell treats it as one literal argument and interprets no metacharacters. Metacharacters are characters with special meaning to the shell. vorbiscomment receives the full string as a file name, finds no such file and exits with an error. No command injection occurs, and the control case holds. A control case is a comparison run where the bug should not appear, proving the difference comes from the bug and not from something else.
The attack path in the wild
1. Attacker holds Author role (sufficient to upload media in ClassicPress/WordPress)2. Attacker crafts a filename containing shell metacharacters: mysong.ogg" & powershell -enc <base64_payload> & echo "3. File is uploaded — getID34. Windows branch builds the unescaped command line and calls shell_exec()5. cmd.exe processes the string and executes the injected commands6. Attacker gets RCE as the web server/PHP process user7. From there: read wp-config.php, drop a webshell, pivot internally
Line by line:
- The attacker has the Author role. In ClassicPress and WordPress, an Author can upload media, so no administrator account is needed.
- The attacker names a file with shell metacharacters in it.
powershell -enc <base64_payload>would run a PowerShell command encoded in base64, a way of packing data as text. Base64 is an encoding, not encryption. - The file is uploaded and reaches getID3.
- The Windows branch builds the command line without escaping and calls
shell_exec(). cmd.exe, the Windows command interpreter, reads the string and runs the injected commands.- The attacker gets RCE as the user the web server or PHP process runs as.
- From there the report lists reading
wp-config.php(the WordPress configuration file, which holds database credentials), dropping a webshell (a small script that gives an attacker a way back in) and pivoting internally (moving from this machine to others inside the network).
6. The disclosure journey
Disclosure is the process of telling the people who can fix a bug, privately first, and then the public.
4 September: initial report to ClassicPress
The researcher filed a private security advisory to ClassicPress via GitHub's security advisory feature. A private advisory is a report visible only to the maintainers until it is published. The ClassicPress maintainer @mattyrob responded the same day, professionally, carefully and correctly. He pointed out that the vulnerable code was in the upstream getID3 package, not in ClassicPress-specific code.
This is responsible disclosure done right on both sides: the researcher reported properly through a private channel, and the maintainer directed the report to the correct root cause.
4 to 5 September: upstream report to getID3
Since getID3 had no SECURITY.md or private vulnerability reporting enabled on GitHub at the time, the researcher reached out to the maintainer James Heinrich through available channels and suggested he set up a private disclosure channel. A SECURITY.md is a file in a code repository that tells researchers how to report problems safely. The researcher also raised Issue #503 to start the conversation publicly.
5 September: upstream patches land
The getID3 maintainer responded quickly. Two commits fixed the issue across all affected files. A commit is a saved change in a code repository.
- 2c6f3f9 patched
getid3.php. - ce598c4 patched
write.vorbiscomment.php,write.metaflac.phpandmodule.audio.shorten.php.
8 September: ClassicPress ships the fix
ClassicPress maintainer @mattyrob coordinated directly with the getID3 maintainer and, once the upstream release was tagged, opened and merged PR #2680 into ClassicPress core. A PR, or pull request, is a proposed change that maintainers review before it is merged into the project.
21 September: CVE assigned
The researcher submitted the CVE request directly to MITRE for the upstream getID3 vulnerability. The CVE was assigned through VulnCheck CNA. A CVE is a public identifier for a known vulnerability, so everyone can refer to the same bug by the same name. A CNA is an organisation authorised to assign those identifiers.
CVE-2026-94106: OS Command Injection via unescaped file names in getID3 below 1.9.26.
7. The fix
The fix is clean and correct: apply escapeshellarg() to every variable that goes into a shell command, with no exceptions and no platform conditionals.
Before (vulnerable)
In getid3.php:
$commandline = '"' . GETID3_HELPERAPPSDIR . 'vorbiscomment.exe" -w -c "' . $empty . '" "' . $file . '" "' . $temp . '"';
Line by line:
$commandline =begins the command text.'"'adds an opening double quote.. GETID3_HELPERAPPSDIR .adds the helper program folder.'vorbiscomment.exe" -w -c "'adds the program name, options and a quote.. $empty .adds the comment file name.'" "'closes and reopens quotes.. $file .adds the uploaded file name with no escaping.'" "'closes and reopens quotes again.. $temp .adds the temporary file name.'"'closes the final quote.
In write.vorbiscomment.php:
$commandline = GETID3_HELPERAPPSDIR . 'vorbiscomment.exe -w --raw -c "' . $tempcommentsfilename . '" "' . $this->filename . '" 2>&1';
Line by line:
$commandline = GETID3_HELPERAPPSDIRstarts with the helper folder.. 'vorbiscomment.exe -w --raw -c "'adds the program, options and an opening quote.. $tempcommentsfilename .adds the temporary comments file.'" "'closes and reopens quotes.. $this->filename .adds the uploaded file name with no escaping.'" 2>&1'closes the quote and redirects errors.
After (patched, v1.9.26)
$commandline = escapeshellarg(GETID3_HELPERAPPSDIR . 'vorbiscomment.exe') . ' -w -c ' . escapeshellarg($empty) . ' ' . escapeshellarg($file) . ' ' . escapeshellarg($temp);
Line by line:
escapeshellarg(GETID3_HELPERAPPSDIR . 'vorbiscomment.exe')wraps the whole program path in escaping, so even a strange folder name cannot break out.. ' -w -c 'adds the options as plain text.. escapeshellarg($empty) . ' 'adds the comment file, escaped, followed by a space.. escapeshellarg($file) . ' 'adds the uploaded file name, escaped, followed by a space.. escapeshellarg($temp)adds the temporary file name, escaped.
$commandline = 'vorbiscomment -w --raw -c ' . escapeshellarg($tempcommentsfilename) . ' ' . escapeshellarg($this->filename) . ' 2>&1';
Line by line:
'vorbiscomment -w --raw -c 'is the fixed program name and options.. escapeshellarg($tempcommentsfilename) . ' 'adds the temporary comments file, escaped.. escapeshellarg($this->filename) . ' 2>&1'adds the uploaded file name, escaped, and redirects errors.
Why escapeshellarg() works
escapeshellarg() wraps the whole argument in single quotes. In POSIX shells (sh, bash), nothing inside single quotes is interpreted: no variables, no command substitution, no metacharacters. A literal single quote inside the value is safely escaped as '\''. On Windows, PHP's escapeshellarg() wraps in double quotes and escapes internal double quotes as "", the cmd.exe convention.
8. Impact and blast radius
CVSS 3.1 score: 8.8 (High)
CVSS is a standard scoring system for how serious a vulnerability is. The vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H breaks down like this:
AV:Nmeans the attack can come over the network.AC:Lmeans the attack is easy to carry out.PR:Lmeans the attacker needs low privileges, such as the Author role.UI:Nmeans no user interaction is needed.S:Umeans the impact stays within the vulnerable component.C:H,I:H,A:Hmean high impact on confidentiality (secrecy), integrity (trustworthiness) and availability (uptime).
Who is affected?
Any PHP application that:
- Allows user-controlled file names.
- Passes those file names to getID3's tag-writing functions.
- Runs on Windows, so the
vorbiscomment.exepath is taken, with getID3 below 1.9.26.
This includes, but is not limited to:
- ClassicPress, which bundles getID3 in every installation.
- Any PHP media management application using
james-heinrich/getid3below 1.9.26 via Composer. - Custom file-handling platforms built on getID3.
Download scale
This does not count direct downloads, Git clones or applications that vendor the library without Composer. Vendoring means copying the library's code into your own project instead of fetching it with a package manager. The actual exposure is significantly larger.
9. Lessons learned
For security researchers
Trace the supply chain. When you find a bug in one project, ask: where does this code actually come from? The real vulnerability here was not in ClassicPress; it was in an upstream library that ClassicPress faithfully included. By pivoting from the downstream consumer to the upstream root cause, a single report became a fix that protected every project using getID3.
Read both code paths. The most telling sign of the bug was the asymmetry between the Windows and Linux branches. The Linux path had escapeshellarg() on every argument. The Windows path had none. When you see one branch being careful and the other being careless, that discrepancy is a red flag worth investigating.
Document control cases. The proof of concept included both the vulnerable command, which proved RCE, and the safe command, which proved the fix works. Showing both makes a disclosure irrefutable and gives the maintainer confidence in their patch.
For developers
Never build shell commands by string concatenation. Use escapeshellarg() on every variable that touches a command string, even if you think the input is controlled. If possible, replace shell-exec patterns with proc_open() using array-based argument lists, which bypass the shell interpreter entirely. proc_open() is a PHP function that runs a program directly, without asking a shell to parse a string first.
Keep your platform branches in sync. The Windows branch forgot something the Linux branch got right. Code review should catch asymmetry between platform-specific code paths, because it is often where bugs hide.
Set up a SECURITY.md and private reporting. At the time of discovery, getID3 had no private disclosure channel. Researchers who find vulnerabilities need a safe path to report them.
Variants to test
If you want to look for similar problems yourself, these are the checks the report suggests. Each one states what a positive result looks like.
- Other platform branches in the same library. Search the code for
shell_exec,exec,systemandpopen, then compare the Windows and POSIX paths argument by argument. A positive result is one branch usingescapeshellarg()and the other concatenating a variable raw. - Other getID3 shell-outs. The fix commit also patched
write.metaflac.phpandmodule.audio.shorten.php. Check whether any other helper binary invocation passes a file name or tag value unescaped. A positive result is a command line where a user-controlled value sits inside quotes withoutescapeshellarg(). - File name metacharacters on Windows. Upload a file whose name contains
"followed by&and a harmless command such aswhoami, then look for the output in a web-accessible path. A positive result is the command's output appearing where the payload wrote it, even when the helper binary itself errors. - File name metacharacters on Linux. Try
;,$()and backticks inside a file name that reaches a shell-out. A positive result is execution of the injected command, or a file name arriving at the binary split into multiple arguments. - Downstream consumers of the library. Check whether the CMS or application passes the original upload file name, rather than a sanitised or generated one, into the metadata-writing API. A positive result is the raw client-supplied name reaching the tag-writing function.
- Role requirements. Test with the lowest role that can upload media, which is Author in ClassicPress and WordPress. A positive result is a successful upload and shell execution without administrative rights.
- Control case. Run the same payload against a build with
escapeshellarg()applied and confirm the string is treated as one literal argument. A positive result for the fix is the binary receiving the full malicious string as a file name and no injected command running.
Glossary
- API: the agreed way one piece of software asks another to do something, like a service counter with defined forms.
- Base64: a way of encoding data as plain text characters; it is not encryption.
- Binary: a ready-to-run program file.
- Blast radius: how much is affected when something goes wrong.
- Branch: one of several alternative paths through code, often chosen by the operating system.
- CNA: an organisation authorised to assign CVE identifiers.
- Command injection: a bug where user input is treated as a command by the operating system.
- Commit: a saved change in a code repository.
- Composer: PHP's package manager, which fetches libraries for a project.
- Control case: a comparison run where the bug should not appear, proving a result comes from the bug itself.
- CVE: a public identifier for a known vulnerability.
- CVSS: a standard scoring system for the severity of a vulnerability.
- CWE-78: the official label for OS command injection.
- Disclosure: the process of reporting a vulnerability to those who can fix it, privately first and then publicly.
- Fork: a copy of a project that someone continues separately.
- Fuzzing: feeding a program large amounts of random or malformed input to find crashes and bugs.
- getID3: a PHP library for reading and writing audio and video metadata.
- HTTP: the protocol browsers and servers use to exchange pages and uploads.
- Maintainer: the person who looks after a project and reviews changes to it.
- Metadata: information about a file, such as a song's title, artist and duration.
- Metacharacters: characters with special meaning to the shell, such as
;,&,>and quotes. - MITRE: the organisation that runs the CVE programme.
- Ogg/Vorbis: an audio format and its comment tags.
- PHP: a programming language many websites are built with.
- POSIX shell: a standard family of command interpreters on Linux and similar systems, such as
shandbash. - PR (pull request): a proposed change that maintainers review before merging it.
- Proof of concept: a small, controlled demonstration that a bug is real.
- RCE (remote code execution): an attacker elsewhere gets their own commands to run on a server.
- Sanitisation: cleaning input so dangerous characters lose their power.
- SECURITY.md: a file in a code repository telling researchers how to report problems safely.
- Shell: the program that takes typed commands and runs them.
- shell_exec: a PHP function that hands a string to the shell and returns what it prints.
- Supply chain: the chain of projects that depend on each other; a broken library affects everything above it.
- Tag: a labelled metadata field inside a media file, such as the artist name.
- Upstream: the original project that others copy from or depend on.
- Vendoring: copying a library's code into your own project instead of fetching it with a package manager.
- VulnCheck: the CNA that assigned this CVE.
- Webshell: a small script that gives an attacker a way back into a server.
- wp-config.php: the WordPress configuration file, which holds database credentials.