Quick answers
- Is CVE-2026-40521 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40521 being exploited in the wild.
- How severe is CVE-2026-40521?
- High severity, with a CVSS score of 8.8, published 29 June 2026.
- Which products and versions are affected?
- FrontAccounting before 2.4.20.
- Is there a fix for CVE-2026-40521?
- A patch was published on 2026-04-24: Fix committed to GitHub repository. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40521 attacked?
- It is attacked over the network, in a network appliance.
- Am I affected by CVE-2026-40521?
- Check whether you run FrontAccounting at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
A path traversal vulnerability exists in the 'attachments' class within 'includes/ui/attachment.inc'. The application fails to use 'basename()' or perform extension validation on the 'unique_name' POST parameter before passing it to 'move_uploaded_file()'. While a global 'html_cleanup()' function exists, it uses 'htmlspecialchars()', which does not filter the dots and slashes required for traversal. An authenticated attacker with standard roles (e.g., AP Officer, Accountant) can provide a payload like '../../../shell.php' to write a PHP webshell into the web root. This results in remote code execution as the web server user. The issue is fixed in version 2.4.20.
Affected products
- FrontAccounting FrontAccounting before 2.4.20
Timeline
- 2026-04-24: patched: Fix committed to GitHub repository.
- 2026-04-29: advisory: Release 2.4.20 announced on SourceForge.
- 2026-06-29: disclosed: CVE-2026-40521 published.
References
- https://github.com/FrontAccountingERP/FA/commit/701fea6848da4a02fb83d30f07a9c0473d6b7e33
- https://jivasecurity.com/writeups/frontaccounting-rce-attachment-upload-cve-2026-40521
- https://sourceforge.net/p/frontaccounting/news/2026/04/release-2420/
- https://www.vulncheck.com/advisories/frontaccounting-path-traversal-rce-via-attachment-upload