The vulnerability in Koha's GetInvoices function reveals a specific pattern failure: developers implemented an allow-list for column names in the ORDER BY clause but concatenated the direction token ('ASC'/'DESC') without validation. This is the latest iteration of a documented regression in SQL injection defense — each generation of secure coding guidance produces a new mutation where developers secure the obviously dangerous input while missing the adjacent syntax token. The direction token was considered 'safe' because it supposedly accepts only two values, but that assumption has been exploited before in other codebases. Standard parameterized queries cannot bind ASC/DESC tokens since they are syntactic tokens, not values — this creates a genuine technical constraint that pushes developers toward concatenation, but the fix requires recognizing that direction tokens are an entire class of injection surface, not just this specific instance. The permission requirement (acquisition => order_receive) limits the initial attacker pool, but in library deployments, acquisitions staff often have cross-module access to cataloging and patron management. More critically, the extraction target isn't module data — it's bcrypt password hashes and TOTP secrets stored in the system, making this a credential-harvesting operation rather than opportunistic data theft. The time-based blind extraction is slow but viable for persistent attackers. Check your entire codebase for other ORDER BY constructions where column names are validated but adjacent tokens are concatenated — this pattern has appeared repeatedly and likely exists elsewhere in Koha's legacy C4 modules. The allow-list approach itself creates maintenance debt: every new schema column requires updating the allow-list, guaranteeing ongoing attention to this query construction path.
CVE-2026-72609
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn SQL injection vulnerability in Koha through 24.11.17, 25.05.12, 25.11.06, and 26.05.01 allows authenticated staff with the acquisition => order_receive permission to read arbitrary database contents via the orderby request parameter in acqui/parcels.pl. The parameter is passed to C4::Acquisition::GetInvoices, which allow-lists the column name but concatenates the direction token raw into the SQL ORDER BY clause without validation. Exploitation is blind (time-based) in production and allows extraction of patron PII, staff bcrypt password hashes, and two-factor secrets.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysisUser input is woven into a database query, letting an attacker rewrite the query's logic. From there they can read, alter, or destroy data — frequently the entire database. The reliable fix is parameterised queries (prepared statements), so input is always treated as data and never as SQL.
General guidance for the sql injection class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- Low
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataThere is no version to upgrade to and no patch to apply. Every affected install stays exposed until the vendor ships a fix — or somebody else builds one.
Free. We build fixes in the order the community asks for them — and we’ll tell you the moment this one lands.
We develop and verify an original fix where the vendor hasn’t, from $4,900. Deployed to your staging first — never straight to production.
Scope it with usSee what else the community needs solved on the solutions-needed board.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-72609 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesThe vulnerability in Koha's GetInvoices function reveals a specific pattern failure: developers implemented an allow-list for column names in the ORDER BY clause but concatenated the direction token ('ASC'/'DESC') without validation. This is the latest iteration of a documented regression in SQL injection defense — each generation of secure coding guidance produces a new mutation where developers secure the obviously dangerous input while missing the adjacent syntax token. The direction token was considered 'safe' because it supposedly accepts only two values, but that assumption has been exploited before in other codebases. Standard parameterized queries cannot bind ASC/DESC tokens since they are syntactic tokens, not values — this creates a genuine technical constraint that pushes developers toward concatenation, but the fix requires recognizing that direction tokens are an entire class of injection surface, not just this specific instance. The permission requirement (acquisition => order_receive) limits the initial attacker pool, but in library deployments, acquisitions staff often have cross-module access to cataloging and patron management. More critically, the extraction target isn't module data — it's bcrypt password hashes and TOTP secrets stored in the system, making this a credential-harvesting operation rather than opportunistic data theft. The time-based blind extraction is slow but viable for persistent attackers. Check your entire codebase for other ORDER BY constructions where column names are validated but adjacent tokens are concatenated — this pattern has appeared repeatedly and likely exists elsewhere in Koha's legacy C4 modules. The allow-list approach itself creates maintenance debt: every new schema column requires updating the allow-list, guaranteeing ongoing attention to this query construction path.
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-72609 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data