🛡️ CVE-2026-52773 — yeswiki

⚪ Unknown ✅ No Known Exploit CWE-80 OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

YesWiki Vulnerable to Reflected XSS via Unescaped Archived-Revision time Parameter in handlers/page/show.php

Summary

YesWiki's archived-revision view reflects the time GET parameter into a hidden HTML input in handlers/page/show.php without escaping. Because MySQL coerces malformed DATETIME strings, an attacker can append HTML or JavaScript to a valid archived revision timestamp, still load that archived revision, and execute arbitrary JavaScript in the victim's browser.

The vulnerable form is only rendered when the victim can both read and edit the target page. In restricted deployments this requires a victim with read and write access to that page. On a default doryphore 4.6.5 install, public pages such as PagePrincipale were editable anonymously during validation, so the issue can also affect unauthenticated visitors in that configuration.

Details

The request routing path uses the user-controlled time parameter to load a specific page revision. In includes/YesWiki.php around Run() line 1223, the request is routed through:

```php

$this->SetPage($this->LoadPage($tag, isset($_REQUEST['time']) ? $_REQUEST['time'] : ''));

```

LoadPage() delegates to PageManager::getOne() in includes/services/PageManager.php around line 75, which builds a SQL predicate directly from the supplied revision time:

```php

$timeQuery = $time ? "time = '{$this->dbService->escape($time)}'" : "latest = 'Y'";

```

If the loaded page is an archived revision (latest == 'N') and the current user has write access, handlers/page/show.php around lines 43-49 renders an edit form for that archived revision and copies $_GET['time'] into a hidden input without htmlspecialchars():

```php

$time = isset($_GET['time']) ? $_GET['time'] : '';

echo $this->FormOpen(testUrlInIframe() ? 'editiframe' : 'edit', '', 'get');

<input type="hidden" name="time" value="<?php echo $time; ?>" />

```

That sink is reachable only when all of the following are true:

1. The target page has at least one archived revision.

2. The victim can read the target page.

3. The victim can write the target page, because the archived revision edit form is rendered only inside the if ($this->HasAccess('write')) branch.

In practice, the payload must begin with a real archived revision timestamp. A completely invalid time value does not reach the archived branch because YesWiki only updates the current page object when the revision lookup returns a non-empty row.

During local validation on the official doryphore 4.6.5 package, the exploit worked because MySQL accepted a malformed timestamp string as matching an existing archived revision row. For example, the following expression was coerced to the stored revision time:

```sql

CAST(CONCAT('2026-05-24 04:30:00', CHAR(34), CHAR(62), CHAR(60), 'script', CHAR(62), 'alert(1)', CHAR(60), '/script', CHAR(62)) AS DATETIME)

```

and the corresponding query predicate still matched the archived row:

```sql

WHERE time = '2026-05-24 04:30:00"><script>alert(1)</script>'

```

This means a payload can begin with a valid archived revision timestamp, still resolve to the archived revision, and then be reflected unescaped into the hidden HTML field.

For comparison, tools/bazar/handlers/page/show__.php around lines 13-14 escapes the same time value with htmlspecialchars(), which shows that the core handler's behavior is inconsistent and unsafe.

This issue maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

PoC

1. Set up a vulnerable YesWiki instance. This was validated locally on the official doryphore 4.6.5 release.

2. Use a target page that has at least one archived revision. Any page with revision history is sufficient.

3. Confirm the victim has the rights needed to reach the vulnerable sink:

  • The victim must have read access to the page.
  • The victim must have write access to the page.
  • On the default validation install, these rights were available anonymously on public pages such as PagePrincipale, so no login was required in that configuration.

4. Identify the timestamp of an archived revision. In the validated setup, an archived PagePrincipale revision existed at 2026-05-24 04:30:00.

5. Send the victim a crafted URL that starts with that valid archived revision timestamp and then appends an attribute-breaking payload:

```text

http://127.0.0.1:8085/PagePrincipale?time=2026-05-24%2004:30:00%22%3E%3Cscript%3Ealert(1)%3C/script%3E%3Cinput%20value=%22

```

6. Open the URL in a browser as a victim who has the required read and write rights.

7. Observe that YesWiki still loads the archived revision view and displays the archived-revision warning block, proving the malformed time value matched the stored archived revision.

8. Inspect the returned HTML. The response contains the injected payload inside the hidden form field:

```html

<input type="hidden" name="time" value="2026-05-24

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity low, availability none.

Weakness class

CVE-2026-52773 is classified as CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS). The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream…

Affected software

CVE-2026-52773 is recorded against 1 package.

  • yeswiki/yeswiki (from 4.1.0 up to 4.6.6)

Timeline and source

Published on 9 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE CWE-80
Public Exploit ✅ No
Source OSV
Published 2026-07-09
Updated 2026-08-12
Modified 2026-07-09
Fix URL N/A

Affected Packages

Software From version Fixed in
yeswiki/yeswiki 4.1.0 4.6.6

Similar Threats

Free Vulnerability Check

Is your site affected by CVE-2026-52773?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-52773 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026