CVE-2026-40522: FrontAccounting SQL injection in Bank Statement report

CVE-2026-40522 · Severity: high · CVSS 7.1 · Published 2026-06-29

FrontAccounting, an open-source enterprise resource planning (ERP) system, contains a security flaw in its bank statement reporting feature. An authorized user can exploit this flaw to trick the system into revealing sensitive information from the database, such as other users' login credentials and email addresses. This data is then delivered to the attacker inside a standard-looking PDF report, potentially leading to full account takeovers and unauthorized access to financial records.

Technologies: FrontAccounting. Vendors: FrontAccounting.

Quick answers

Is CVE-2026-40522 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40522 being exploited in the wild.
How severe is CVE-2026-40522?
High severity, with a CVSS score of 7.1, published 29 June 2026.
Which products and versions are affected?
FrontAccounting before 2.4.20.
Is there a fix for CVE-2026-40522?
A patch was published on 2026-04-17: Initial fix committed to repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-40522 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-40522?
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 UNION-based SQL injection vulnerability exists in FrontAccounting's reporting engine, specifically within 'reporting/rep601.php' (the Bank Statement report). The application fails to sanitize or parameterize the 'PARAM_0' POST parameter before concatenating it into a WHERE clause in a SQL query targeting the 'bank_accounts' table. An authenticated attacker with 'SA_BANKREP' permissions can inject 'UNION SELECT' payloads to exfiltrate sensitive data, including unsalted MD5 password hashes from the 'users' table. The results of the malicious query are rendered directly into the generated PDF report output. The vulnerability is addressed in version 2.4.20 by implementing proper database escaping using 'db_escape()'.

Affected products

  • FrontAccounting FrontAccounting before 2.4.20

Timeline

  • 2026-04-17: patched: Initial fix committed to repository
  • 2026-04-24: advisory: Release 2.4.20 announcement published on SourceForge
  • 2026-06-29: disclosed: CVE-2026-40522 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.