---
id: "CVE-2026-120203"
kind: "vulnerability"
aliases: ["CVE-2026-120203"]
title: "ShowDoc: Mock feature lets logged-in users run shell commands"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["docker", "package", "php", "self-hosted", "showdoc"]
not_affected_if: ["managed-hosting", "version-3.9.6-or-later"]
published_at: "2026-10-31T18:17:08+00:00"
first_seen_at: "2026-10-31T18:37:12+00:00"
updated_at: "2026-10-31T18:38:35+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120203", "first_seen_at": "2026-10-31T18:37:12+00:00"}]
---

# ShowDoc: Mock feature lets logged-in users run shell commands

ShowDoc is a self-hosted API documentation tool. An authenticated user can store a crafted mockjs template that the server evaluates, letting them run shell commands on the server, as root in the official Docker image.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the ShowDoc version in use; affected versions are `2.8.14` up to but not including `3.9.6`.
- If running the official Docker image, check the image tag and whether processes run as root.

## Fix

- Move to ShowDoc `3.9.6` or later.

## Timeline

- 2026-10-31T18:37:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120203

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
