Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade yeswiki/yeswiki to version 4.7.0 or higher.
Affected versions of this package are vulnerable to SQL Injection via the query parameter in SearchManager.php, which constructs a SQL SELECT statement without validating field property names. An unauthenticated attacker can supply a malicious field identifier containing SQL expressions through the Bazar form entries API endpoint, causing those expressions to be evaluated directly by the database engine. The fix introduces a validation pattern (PROPERTY_NAME_PATTERN) that restricts field identifiers to letters, digits, underscores, and hyphens, and rejects forms containing invalid names before they reach the query builder.
A default installation contains Bazar form 2 (Agenda) with the structured map field bf_latitude and sample entries. Send the following unauthenticated request to a test instance:
GET /?api/forms/2/entries&query=bf_latitude.%22x%60%2CSLEEP%282%29%20AS%20injected_delay%2Ctag%20AS%20%60y%22%3D%3Dignored HTTP/1.1
Host: TARGET
Accept: application/json
Connection: close
Adjust the base path if YesWiki is installed below a subdirectory.
The vulnerable response is delayed by approximately two seconds per matching entry because the injected SLEEP(2) expression is evaluated inside the generated SELECT. The equivalent request without the query parameter returns normally:
GET /?api/forms/2/entries HTTP/1.1
Host: TARGET
Accept: application/json
Connection: close
The payload was validated against the unmodified SearchManager.php from YesWiki v4.6.7. In an isolated one-row MySQL fixture, the control returned in 0.001s and the request above returned in 2.001s.
Note: The PoC targets a default YesWiki installation containing Bazar form 2 (Agenda) with a structured map field and sample entries, validated against the unmodified SearchManager.php from YesWiki v4.6.7 using an isolated one-row MySQL fixture.