high CVSS 7.6

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
2025-01-21

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 php

Defensia 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

  1. 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
  2. Verify the attach component is active: Check if tools/attach/ directory exists and contains libs/attach.lib.php in your YesWiki installation
  3. 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
  4. 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

CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
CVE-2026-28289CVSS 10FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. A patch bypass vulnerability for CVE-2026-27636 in FreeScout 1.8.206 and earlier allows any authenticated user with file upload permissions to achieve Remote Code Execution (RCE) on the server by uploading a malicious .htaccess file using a zero-width space character prefix to bypass the security check. The vulnerability exists in the sanitizeUploadedFileName() function in app/Http/Helper.php. The function contains a Time-of-Check to Time-of-Use (TOCTOU) flaw where the dot-prefix check occurs before sanitization removes invisible characters. This vulnerability is fixed in 1.8.207.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.

References

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