Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-2c83-wfv3-q25f

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in ZMarkdown

Published
Sep 7, 2021
Updated
Sep 7, 2021
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

rebbernpm
1Kdownloads / week

Description

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmrebberall versions5.2.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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.

  3. 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.

  4. 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

### 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: ````markdown ``` \end{CodeBlock} \immediate\write18{COMMAND > outputrce} \input{outputrce} \begin{CodeBlock}{text} ``` ```` Will insert into the generated LaTeX the result of executi
O3 Security · Impact-Aware SCA

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.