GHSA-2c83-wfv3-q25f
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in ZMarkdown
Blast Radius
Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.
rebbernpmDescription
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 executing
COMMAND on the system.
Patches
The vulnerability has been patched in version 5.2.1. If impacted, you should update to this version as soon as possible.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | rebber | all versions | 5.2.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rebber. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update rebber to 5.2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2c83-wfv3-q25f is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-2c83-wfv3-q25f is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-2c83-wfv3-q25f. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-2c83-wfv3-q25f in your dependencies?
O3 detects GHSA-2c83-wfv3-q25f across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.