GHSA-4pf7-cc4r-g63h

Suggest an improvement
Source
https://github.com/advisories/GHSA-4pf7-cc4r-g63h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4pf7-cc4r-g63h/GHSA-4pf7-cc4r-g63h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4pf7-cc4r-g63h
Aliases
Published
2026-07-09T21:02:40Z
Modified
2026-07-09T21:26:42Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
YesWiki has Authenticated SQL Injection via ReactionManager
Details

Summary

YesWiki through the latest development branch contains a SQL injection vulnerability in ReactionManager::deleteUserReaction() that allows any authenticated user to inject arbitrary SQL via the {idreaction} and {id} URL path parameters. The parameters are concatenated directly into a SQL LIKE clause without escaping or parameterization.

This is a sibling of CVE-2026-46670 (unauthenticated SQLi in FormManager::create()). Both share the same root cause — raw string concatenation into SQL queries — but exist in different components.

Root Cause

includes/controllers/ApiController.php line 726:

/**
 * @Route("/api/reactions/{idreaction}/{id}/{page}/{username}", methods={"DELETE"}, options={"acl":{"+"}})
 */

ACL "+" = any authenticated user. Parameters flow into ReactionManager::deleteUserReaction()TripleStore::delete() with raw string concatenation into SQL LIKE clause (line 356).

The if branch (lines 340-354) properly uses $this->dbService->escape(). The else branch does not — the developer applied escaping to one code path but not the other.

PoC

DELETE /wiki/?api/reactions/x%27%20OR%201=1%20OR%20value%20LIKE%20%27/test/SomePage/attacker
Host: localhost:8085
Cookie: <session cookie>

Time-based blind variant via {id} parameter for data exfiltration.

Impact

Full database read/write. Any self-registered user can extract yeswiki_users password hashes and emails.

Suggested Fix

Apply $this->dbService->escape() to all parameters in the else branch, matching the if branch pattern. Also audit all TripleStore::delete() callers that pass $extraSQL.

Credits

Kai Aizen / SnailSploit

Database specific
{
    "cwe_ids":  [
        "CWE-89"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-09T21:02:40Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Packagist / yeswiki/yeswiki

Package

Name
yeswiki/yeswiki
Purl
pkg:composer/yeswiki/yeswiki

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
4.6.6

Affected versions

v4.*
v4.1.0
v4.1.1
v4.1.2
v4.1.3
v4.1.4
v4.1.5
v4.2.0
v4.2.1
v4.2.2
v4.2.4
v4.3
v4.3.1
v4.4.0
v4.4.1
v4.4.2
v4.4.3
v4.4.4
v4.4.5
v4.5.0
v4.5.1
v4.5.2
v4.5.3
v4.5.4
v4.5.5
v4.6.0
v4.6.1
v4.6.2
v4.6.3
v4.6.4
v4.6.5
4.*
4.2.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-4pf7-cc4r-g63h/GHSA-4pf7-cc4r-g63h.json"