All vulnerabilities

Servers and applications

CVE-2026-52778

Unsafe eval() in Formula Calculator - Remote Code Execution (RCE) & Denial of Service (DoS)

Severity
Critical 9.8
Published
2 Jun 2026
Last changed
8 Jun 2026
Added to UpHeron
3 Nov 2026
Fixed in
4.6.6
Exploit chance
0.8% in the next 30 daysHigher than 57% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Code injection (CWE-94)Regular expression denial of service (ReDoS) (CWE-1333)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-px5m-h76g-p7p8
Sources
Project advisories (GitHub)

Description

An unsafe execution vulnerability exists in the Bazar form field calculator (CalcField.php) of YesWiki. The application attempts to sanitize user-defined mathematical formulas using a complex recursive regular expression before passing them to the PHP eval() function. This implementation is inherently flawed: it is vulnerable to Regular Expression Denial of Service (ReDoS / Stack Overflow) which can crash the server, and it creates a high-risk architecture where any logic bypass directly results in arbitrary PHP code execution.

Affected Component

  • File: tools/bazar/fields/CalcField.php
  • Method: formatValuesBeforeSave($entry)
  • Vulnerable Mechanism: Combination of a complex recursive regex validation followed by eval().

The code attempts to implement a sandbox for mathematical operations by verifying the formula structure before executing it:

From YesWiki/yeswiki's security advisory. Shortened; the full text is there.

Workarounds

  • Do not use regular expressions to safe-guard eval(). Instead, replace the execution block with a dedicated, safe Abstract Syntax Tree (AST) math parser or an expression language component that cannot execute system context.
Workarounds as given by YesWiki/yeswiki's security advisory.

Affected software

SoftwareAffected versions
YesWikiServers and applications · github:yeswiki/yeswiki
  • Every version before 4.6.6

About YesWiki

Free wiki-style software for building online sharing and collaboration platforms

From Wikidata, CC0 1.0.
GitHub stars
139GitHub, 15 Nov 2026
Forks
75GitHub, 15 Nov 2026
Latest release
v4.7.2GitHub, 15 Nov 2026
Released
1 Nov 2026GitHub
License
AGPL-3.0GitHub
Written in
PHPWikidata
First released
2009Wikidata
First published on GitHub
9 Sept 2009GitHub

References