Summary
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in ZMarkdown
Workarounds
It is possible to mitigate the vulnerability without upgrading by using a
custom code macro. Please make sure this custom macro escapes your
closing LaTeX sequence. For the example above, use:
const escaped = content.replace(new RegExp('\\\\end\\s*{CodeBlock}', 'g'), '')
For more information
If you have any questions or comments about this advisory, open an issue in ZMarkdown.
Impact
A Remote Command Execution vulnerability was found in the rebber module,
which allowed execution of arbitrary commands. The reported problem came
from CodeBlocks, which could be escaped to insert malicious LaTeX.
Anyone using rebber without sanitation of code content or a custom
macro is impacted by this vulnerability. Here is an example of a Markdown
content that will exploit the vulnerability:
```
\end{CodeBlock}
\immediate\write18{COMMAND > outputrce}
\input{outputrce}
\begin{CodeBlock}{text}
```
Will insert into the generated LaTeX the result of executingCOMMAND on the system.
Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The vulnerability has been patched in version 5.2.1.
If impacted, you should update to this version as soon as possible.
Frequently Asked Questions
- What is GHSA-2C83-WFV3-Q25F? GHSA-2C83-WFV3-Q25F is a critical-severity OS command injection vulnerability in rebber (npm), affecting versions < 5.2.1. It is fixed in 5.2.1. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
- Which versions of rebber are affected by GHSA-2C83-WFV3-Q25F? rebber (npm) versions < 5.2.1 is affected.
- Is there a fix for GHSA-2C83-WFV3-Q25F? Yes. GHSA-2C83-WFV3-Q25F is fixed in 5.2.1. Upgrade to this version or later.
- Is GHSA-2C83-WFV3-Q25F exploitable, and should I be worried? Whether GHSA-2C83-WFV3-Q25F is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-2C83-WFV3-Q25F is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-2C83-WFV3-Q25F? Upgrade
rebberto 5.2.1 or later.