CVE-2025-24018·PHP vulnerability
YesWiki is a wiki system written in PHP. In versions up to and including 4.4.5, it is possible for an authenticated user with rights to edit/create a page or comment to trigger a stored XSS which will be reflected on any page where the resource is loaded. The vulnerability makes use of the content edition feature and more specifically of the `{{attach}}` component allowing users to attach files/medias to a page. When a file is attached using the `{{attach}}` component, if the resource contained in the `file` attribute doesn't exist, then the server will generate a file upload button containing the filename. This vulnerability allows any malicious authenticated user that has the right to create a comment or edit a page to be able to steal accounts and therefore modify pages, comments, permissions, extract user data (emails), thus impacting the integrity, availability and confidentiality of a YesWiki instance. Version 4.5.0 contains a patch for the issue.
- Severity
- high
- Software
- PHP
- Fixed in
- 4.5.0
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.40% — higher than 33% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2025-24018 scores 7.6 on CVSS, so a successful attack would be serious — but at 0.40%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
Until: 4.5.0
Fixed in: 4.5.0
How to fix this CVE
YesWiki instances running version 4.4.5 or earlier contain a stored XSS vulnerability in the {{attach}} component that allows authenticated attackers to inject malicious scripts. Upgrade YesWiki to version 4.5.0 or later immediately, as this release patches the unsafe file attribute handling in the attach library that fails to properly sanitize nonexistent file references.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST /wakka.php?wiki=PageName (with multipart form data containing {{attach}} tags with malicious JavaScript in file attribute; look for patterns like file='<img src=x onerror=...>' or file='javascript:alert(...)' in page edit requests)WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block or sanitize POST requests containing {{attach}} directives with unquoted or improperly encoded file attributes; implement input validation on the file parameter to reject values containing script tags, event handlers (onerror, onload), or JavaScript protocols before the attach library processes them.How to check if you are affected
- Check YesWiki version: Look for the version string in /yeswiki/wakka.php or the admin panel under System Information; confirm it is below 4.5.0
- Verify the attach component is active: Check if tools/attach/ directory exists and contains libs/attach.lib.php in your YesWiki installation
- Search access logs for suspicious {{attach}} patterns: grep -r 'attach.*file=' /var/log/apache2/access.log | grep -v '.jpg\|.png\|.pdf' to find unusual file parameter usage
- Confirm remediation by checking version after upgrade: Navigate to YesWiki admin panel and verify version is 4.5.0 or higher
FAQ
What is CVE-2025-24018?
CVE-2025-24018 is a stored cross-site scripting (XSS) vulnerability in YesWiki's {{attach}} component that allows authenticated users to inject malicious JavaScript through improperly sanitized file attribute values, which then executes when the page is viewed by other users.
Is CVE-2025-24018 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available, though it remains a significant risk for YesWiki installations with untrusted editors.
What versions of YesWiki are affected by CVE-2025-24018?
All YesWiki versions up to and including 4.4.5 are vulnerable; version 4.5.0 and later contain the security patch.
How do I check if my YesWiki instance is vulnerable to CVE-2025-24018?
Log into your YesWiki admin panel and note the version number displayed; if it shows 4.4.5 or earlier, the instance is vulnerable. Alternatively, check the version in the root wakka.php file: grep -i 'version' /path/to/yeswiki/wakka.php
Does Defensia detect CVE-2025-24018?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and YesWiki are installed on a monitored server, CVE-2025-24018 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
- https://github.com/YesWiki/yeswiki/blob/v4.4.5/tools/attach/libs/attach.lib.php#L660
- https://github.com/YesWiki/yeswiki/commit/c1e28b59394957902c31c850219e4504a20db98b
- https://github.com/YesWiki/yeswiki/security/advisories/GHSA-w59h-3x3q-3p6j
- https://github.com/YesWiki/yeswiki/security/advisories/GHSA-w59h-3x3q-3p6j
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-24018. Free for 1 server.
Get started free