Description
ShowDoc 2.8.14 before 3.9.6 contains a code injection vulnerability in its Mock feature that allows authenticated users to execute shell commands through mockjs templates. Attackers can store a template via MockController::add with escaped parentheses that mockjs evaluates with eval(), then trigger it through MockController::infoByKey to run commands, as root in the official Docker image.
Published: 2026-10-31
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

ShowDoc versions prior to 3.9.6 contain a code injection flaw in the Mock feature that allows an authenticated user to execute arbitrary shell commands. The vulnerability leverages the mockjs template engine, which evaluates user supplied data via eval. An attacker can upload a crafted template containing escaped parentheses; when that template is retrieved through the infoByKey endpoint the eval call is executed, causing the shell command to run. The flaw thus grants attackers the ability to execute commands with the privileges of the running ShowDoc process, which can be root in the default Docker image.

Affected Systems

Both open source and Dockerized deployments of ShowDoc from version 2.8.14 up to, but excluding, 3.9.6 are affected. This includes any server that hosts the Mock endpoint and permits authenticated users to add or view mock templates. Earlier releases before 2.8.14 and releases 3.9.6 and later contain the fix.

Risk and Exploitability

The CVSS score of 8.7 classifies this as a high‑severity vulnerability. While the EPSS score is not available, the nature of the flaw and its presence in the public Docker image suggest that exploitation could occur without sophisticated prerequisites. The vulnerability is not listed in the CISA KEV catalog, but the ability to run arbitrary commands—even as root—makes it extremely dangerous for any environment that does not restrict access to the Mock API or monitors for suspicious template content.

Generated by OpenCVE AI on October 31, 2026 at 19:20 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to ShowDoc version 3.9.6 or newer to remove the code injection path.
  • If an upgrade is not immediately possible, disable the Mock endpoint for all non‑admin users or remove the feature entirely from the deployment.
  • When running ShowDoc in Docker, configure the container to execute as a non‑root user to limit the impact of any potential command execution.

Generated by OpenCVE AI on October 31, 2026 at 19:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 31 Oct 2026 17:30:00 +0000

Type Values Removed Values Added
Description ShowDoc 2.8.14 before 3.9.6 contains a code injection vulnerability in its Mock feature that allows authenticated users to execute shell commands through mockjs templates. Attackers can store a template via MockController::add with escaped parentheses that mockjs evaluates with eval(), then trigger it through MockController::infoByKey to run commands, as root in the official Docker image.
Title ShowDoc 2.8.14 before 3.9.6 Code Injection via Mock Templates
First Time appeared Showdoc
Showdoc showdoc
Weaknesses CWE-94
CPEs cpe:2.3:a:showdoc:showdoc:*:*:*:*:*:*:*:*
Vendors & Products Showdoc
Showdoc showdoc
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-31T17:25:52.170Z

Reserved: 2026-10-31T11:44:47.454Z

Link: CVE-2026-120203

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-31T18:17:08.237

Modified: 2026-10-31T18:17:08.237

Link: CVE-2026-120203

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-31T19:30:13Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')