Skip to main content

YesWiki CVE-2026-52762

HIGH
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-07-09 https://github.com/YesWiki/yeswiki GHSA-65p8-9433-jpcp
7.1
CVSS 4.0 · Vendor: https://github.com/YesWiki/yeswiki
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Compromise admin credentials (phish/brute-force)
  2. Delivery
    Authenticate as YesWiki administrator
  3. Exploit
    Inject Twig OS-command payload into Bazar form `bn_sem_template` field
  4. Install
    Save form configuration (payload persisted to database)
  5. C2
    Unauthenticated HTTP GET to `/api/forms/{id}/entries/json-ld` triggers Twig rendering
  6. Execute
    PHP callable executes OS command server-side
  7. Impact
    Interactive reverse shell established on YesWiki host

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Exploitation Conditions

Administrator-level authentication on the YesWiki instance is required for the planting phase - an attacker must log in as a YesWiki admin and edit a Bazar form's bn_sem_template or bn_sem_reverse_template field to inject the malicious Twig payload. Once stored, the trigger phase requires no credentials: any unauthenticated HTTP GET request to /api/forms/{id}/entries/json-ld is sufficient to cause server-side execution of the stored payload. Exploitation is bounded by: (1) the need for a compromised or rogue administrator account before the payload can be planted; (2) the Bazar module must be active (it is a core YesWiki feature, not optional); (3) the targeted form must have at least one entry for the template rendering path to be reached. No non-standard network conditions or configuration options are required beyond a reachable YesWiki HTTP/HTTPS endpoint.

Impact

The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N, score 7.1) contains two significant metric conflicts with the actual vulnerability description. First, PR:L understates the access requirement - the advisory explicitly requires administrator-level credentials to plant the payload, which maps to PR:H in standard CVSS convention. Second, the impact assignment of VI:H with no confidentiality or availability impact is inconsistent with a confirmed OS-level RCE primitive: achieving an interactive shell on the underlying host constitutes C:H/I:H/A:H across the vulnerable system. The true severity, absent these apparent scoring errors, would be materially higher. The stored nature of the exploit means that after a single admin-level planting event, any subsequent unauthenticated HTTP request to the public semantic endpoint serves as a trigger - making the persistent payload automatable and difficult to detect without monitoring Bazar form content. Publicly available exploit code exists per the GHSA advisory, which lowers the bar for exploitation considerably. No EPSS data was provided; KEV status is not confirmed. Even a modest deployment without admin account controls should treat this as high-urgency given the public PoC and the zero-interaction trigger phase.

Exploit ScenarioDerived

An attacker who has obtained a YesWiki administrator account (through credential stuffing, phishing, or an insider) navigates to the Bazar form management interface, injects a Twig reverse-shell payload into the bn_sem_template field of any form, and saves it. Subsequently, any unauthenticated HTTP GET request to GET /api/forms/{id}/entries/json-ld - including automated crawlers or monitoring probes - causes the backend to render the stored payload, spawning an interactive OS shell back to the attacker's listener without requiring further interaction. A working PoC demonstrating this full chain (SSTI confirmation through to interactive shell) is included in the published GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Sep 05, 2026

Stored Server-Side Template Injection in YesWiki's Bazar module allows an authenticated administrator to plant arbitrary Twig expressions into form semantic template fields (bn_sem_template, bn_sem_reverse_template), which are persistently stored and later executed server-side when unauthenticated requests reach the public JSON-LD semantic endpoint. Published proof-of-concept in the GHSA advisory confirms full escalation from harmless template evaluation ({{ 7 * 7 }} → 49) to interactive OS-level reverse shell. The fix is confirmed in YesWiki v4.6.6, a dedicated security release addressing 12 CVEs; no CISA KEV listing at time of analysis, but publicly available exploit code exists.

Earlier versions of this analysis (1)
v1 Jul 28, 2026 - 01:37

Remote code execution in YesWiki's Bazar semantic templates allows an authenticated administrator to store malicious Twig code that executes server-side when unauthenticated users trigger the public JSON-LD endpoint. This leads to full operating-system command execution and interactive shell access on the host. A patch is available in version 4.6.6, and public proof-of-concept code exists.

RemediationAI

Upgrade YesWiki to version 4.6.6 or later, which is the vendor-confirmed patched release; the specific fix is in commit 89462f1577a8a1fe7fcff75e77b5058a74d8047b. The release is available at https://github.com/YesWiki/yeswiki/releases/tag/v4.6.6. If immediate upgrade is not possible, restrict administrative account access to the Bazar form management interface to the minimum required set of trusted users and enforce strong authentication (MFA) on all admin accounts - this eliminates the planting phase prerequisite. As a secondary compensating control, block or rate-limit access to the /api/forms/*/entries/json-ld public endpoint via WAF or web server ACL; note this will disable the JSON-LD semantic API for all consumers. Audit existing Bazar form definitions for unexpected Twig expressions in bn_sem_template and bn_sem_reverse_template fields to detect payloads already planted by a compromised admin account.

Affected Packages

composer yeswiki/yeswiki fix: 4.6.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

YesWiki is an open-source PHP wiki platform whose Bazar module provides form-based structured data management. The root cause (CWE-1336 - Improper Neutralization of Special Elements Used in a Template Engine) is located in TemplateEngine::renderFromStringNoEscape(), which wraps administrator-supplied strings in a Twig {% autoescape false %} block and passes them directly to $this->twig->createTemplate()->render(). The Twig environment is not sandboxed and does not apply an allowlist policy that would prevent access to PHP callables capable of invoking OS commands. The affected composer package is yeswiki/yeswiki (pkg:composer/yeswiki_yeswiki) in all versions prior to 4.6.6. Because the malicious payload is written to form configuration at admin time and later rendered for any request to GET /api/forms/{id}/entries/json-ld, the vulnerability has both a privileged write phase and an unauthenticated trigger phase.

Know when Ssti gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/YesWiki/yeswiki) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 9.1 CRITICAL

PR:H reflects required admin access for planting; S:C and C:H/I:H/A:H reflect confirmed OS-level shell escalation beyond application boundary.

3.1 AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/YesWiki/yeswiki).

CVSS VectorVendor: https://github.com/YesWiki/yeswiki

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Sep 05, 2026 - 00:31 vuln.today
v2 - CVSS changed
CVSS changed
Sep 05, 2026 - 00:22 NVD
7.1 (HIGH)
CVE Published
Jul 09, 2026 - 20:54 cve.org
HIGH

DescriptionCVE.org

Summary

YesWiki Bazar contains a stored Server-Side Template Injection (SSTI) vulnerability in the semantic template feature that can be escalated to confirmed Remote Code Execution (RCE). An authenticated administrator can place arbitrary Twig expressions into the Semantic template (Twig) field (bn_sem_template), and that content is later executed server-side when public semantic endpoints are requested.

This was first confirmed through a harmless proof payload where {{ 7 * 7 }} was rendered as 49 through the public JSON-LD endpoint. The finding was then further validated locally by storing a Twig payload that invoked a system-level callable, resulting in command execution and an interactive shell on the test machine.

Because the payload is stored in the form configuration and later triggered through a public endpoint, this issue is both persistent and remotely triggerable after an administrator plants the malicious template.

Details

The vulnerable behavior is in the Bazar semantic rendering flow.

The administrator-editable fields:

  • bn_sem_template
  • bn_sem_reverse_template

allow Twig template content to be stored inside a form definition. That content is later rendered by the backend semantic transformer through TemplateEngine::renderFromStringNoEscape(), which passes the user-controlled string into Twig for execution.

Relevant sink:

php
$json = $this->templateEngine->renderFromStringNoEscape($form['bn_sem_template'], $data);

The rendering helper evaluates the supplied string as a live Twig template:

php
public function renderFromStringNoEscape(string $templateString, array $data = []): string
{
    $wrapped = '{% autoescape false %}' . $templateString . '{% endautoescape %}';
    return $this->twig->createTemplate($wrapped)->render($data);
}

This is unsafe because administrator-controlled semantic template text is executed as server-side Twig code rather than treated as inert data. In the validated environment, Twig expressions were first confirmed to execute through a harmless arithmetic payload and were then escalated to operating-system-level command execution by invoking a callable through Twig.

The public trigger path used during validation was:

text
GET /api/forms/2/entries/json-ld

The attack chain is:

  1. An administrator stores malicious Twig code in the semantic template field.
  2. YesWiki saves that payload in the form configuration.
  3. A later request to the public semantic endpoint causes the backend to render and execute the stored Twig.
  4. Because the Twig environment is not adequately constrained, the stored payload can escalate from template execution to system command execution.

PoC

The following steps reproduce the issue on the locally validated YesWiki instance.

Stage 1: Confirm Server-Side Template Execution

  1. Log in to YesWiki as an administrator.
  2. Open Bazar form management.
  3. Edit form ID 2 (Agenda in the validated instance).
  4. Locate the field labeled Semantic template (Twig).
  5. Replace its content with the following harmless payload:
json
{"proof":"{{ 7 * 7 }}"}
  1. Save the form.
  2. Trigger the public semantic endpoint:
bash
curl -s 'https://target.example/?api/forms/2/entries/json-ld'
  1. Observe that the server returns evaluated Twig output instead of the literal string {{ 7 * 7 }}.

Confirmed response:

json
{"@context":null,"@id":"https:\/\/target.example\/?api\/fiche\/2","@type":["ldp:Container","ldp:BasicContainer"],"dcterms:title":"Agenda","ldp:contains":[{"proof":"49","id":"https:\/\/target.example\/?TesT2"},{"proof":"49","id":"https:\/\/target.example\/?Bordeaux"}]}

Key execution proof:

json
"proof":"49"

Stage 2: Confirm Remote Code Execution

After confirming SSTI with the harmless payload above, a second locally controlled payload was stored in the same semantic template field to test whether Twig execution could be escalated to command execution. When the public semantic endpoint was requested, the payload executed on the server and established an interactive shell back to the test listener.

Observed local evidence included:

  • an inbound connection to the attacker's listener
  • an interactive shell prompt on the YesWiki host
  • successful command execution from the shell inside the YesWiki project directory

Observed shell output:

text
Connection received on 172.31.60.19 60308
khizar@Victus:/mnt/c/Users/khiza/Documents/Codex/2026-05-24/i-am-trying-to-make-a/yeswiki-src$ ls
INSTALL.md
LICENSE
Makefile
README.md
SECURITY.md
actions
cache
codex-admin-login.php
composer.json
composer.lock
custom
docker
docs
files
formatters
handlers
includes
index.php
interwiki.conf
javascripts
lang
package.json
private
robots.txt
setup
styles
templates
tests
themes
tools
vendor
wakka.config.php
wakka.php
yeswicli

This confirms that the issue is not limited to template evaluation or data disclosure. In the validated local environment, the stored Twig payload reached full operating-system-level command execution.

Impact

An authenticated administrator can inject arbitrary Twig expressions into Bazar semantic templates, and those expressions are executed server-side when public semantic endpoints are requested.

In the validated environment, this leads to confirmed Remote Code Execution. An attacker with administrator access can:

  • execute arbitrary Twig expressions on the server
  • store a persistent payload in form configuration
  • have that payload triggered later by unauthenticated requests to public semantic endpoints
  • execute operating-system commands on the host
  • gain interactive shell access to the underlying server
  • pivot from application-level administration to full server compromise

This breaks the expected trust boundary between application administration and host-level execution. In practical terms, YesWiki administrator privileges become sufficient to obtain command execution on the server in affected deployments.

Executive ViewAI

Why It Matters

YesWiki installations prior to v4.6.6 face unauthenticated remote code execution and complete system compromise when administrator accounts are compromised or misused; publicly available exploit code exists. An attacker with admin access can inject persistent malicious code that automatically executes when public APIs are accessed, enabling data theft, system takeover, and service disruption. Organizations using YesWiki for team collaboration should treat this as a high-priority remediation target.

Business Impact: High
Compensating Controls

Apply vendor patch: YesWiki v4.6.6

Threat Intelligence Overview

EPSS Score
0.4%
Top 63% exploitable
Prevalence
Low
niche PHP wiki platform, primarily French-speaking community deployments
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:composer/yeswiki_yeswiki

More in Ssti

View all
CVE-2024-23692 CRITICAL POC
9.8 May 31

Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c

CVE-2025-47916 CRITICAL POC
10.0 May 16

Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e

CVE-2024-32651 CRITICAL POC
10.0 Apr 26

changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic

CVE-2024-6386 CRITICAL POC
9.9 Aug 21

Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor

CVE-2026-75650 CRITICAL POC
10.0 Sep 07

Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica

CVE-2026-39980 CRITICAL POC
9.1 Apr 09

Server-Side Template Injection in OpenCTI notifier templates allows privileged administrators with 'Manage customization

CVE-2026-97359 CRITICAL POC
10.0 Sep 24

Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2024-4040 CRITICAL POC
10.0 Apr 22

A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all

CVE-2025-60355 CRITICAL POC
9.8 Oct 28

Server-side template injection in OneBlog v2.3.9 and earlier lets an attacker who can supply FreeMarker template content

CVE-2026-15734 CRITICAL POC
9.8 Aug 06

Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio

CVE-2026-37004 CRITICAL POC
9.8 Aug 27

Unauthenticated remote code execution affects BerriAI litellm through version 1.82.4, where the /prompts/test endpoint r

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy