Command Injection Vulnerability in rebber

rebber Updated 02 Oct 2025

Summary

07/09/2021
CRITICAL
Yes i
Critical
Not published

GHSA-2c83-wfv3-q25f: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in ZMarkdown. Affects rebber versions < 5.2.1. Fixed in 5.2.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

rebber is an npm package used for generating LaTeX from Markdown content. It is commonly used by developers to convert Markdown files into LaTeX documents. However, a vulnerability has been discovered in rebber that allows for remote command execution. This vulnerability can be exploited by inserting malicious LaTeX code into Markdown content, leading to the execution of arbitrary commands on the system.

Vulnerability Detail

The vulnerability in rebber arises from improper neutralization of special elements used in an OS command (OS Command Injection). The issue originates from the CodeBlocks feature, which can be escaped to insert malicious LaTeX code. By crafting a Markdown content with specific formatting, an attacker can execute arbitrary commands on the system. This poses a significant security risk to any user of rebber who does not properly sanitize code content or use a custom macro. The vulnerability has been assigned a critical severity level and is classified under CWE-78.

How To Fix

Minimum fixed version

5.2.1

This is the first release that contains the fix.

npm install rebber@5.2.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of rebber is not immediately feasible, a temporary workaround can be implemented by using a custom code macro. The custom macro should properly escape the closing LaTeX sequence to prevent the injection of malicious commands. For example, the following JavaScript code can be used as a custom macro:

const escaped = content.replace(new RegExp('\\\\end\\s*{CodeBlock}', 'g'), '')

Conclusion

The command injection vulnerability in rebber poses a significant security risk to users who do not upgrade to the patched version or implement the recommended workaround. It is crucial to update to rebber version 5.2.1 or later to ensure the security and integrity of the generated LaTeX documents. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for rebber →

Share this vulnerability

FAQ

rebber is an npm package used for generating LaTeX from Markdown content. It is commonly used by developers to convert Markdown files into LaTeX documents.

The vulnerability allows for remote command execution, enabling an attacker to execute arbitrary commands on the system. This can lead to unauthorized access, data breaches, and other malicious activities.

Any user of rebber who does not properly sanitize code content or use a custom macro is affected by this vulnerability.

Yes, the vulnerability has been patched in rebber version 5.2.1. Users are advised to update to this version or later to mitigate the risk.

Yes, a temporary workaround is available by using a custom code macro that properly escapes the closing LaTeX sequence. The provided JavaScript code snippet can be used as a workaround.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

5.2.1

This is the first release that contains the fix.

npm install rebber@5.2.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback