Recurnix docs

Docs › Releases › 1.17 › Changelog

Recurnix 1.17 changelog

Every change in 1.17, by kind. For what it means and whether to update, read the release notes.

Fixed

  • A logo could be a program. The branding upload accepted svg and wrote it to public_path('uploads/branding') — inside the web root. An SVG is a document, not a picture: it can carry <script>, onload=, javascript: URLs and a <foreignObject> full of HTML. Through an <img> tag none of that runs, which is exactly why a weaponised logo looks perfectly ordinary on every page of the panel — but the file also has a URL of its own, and opening that URL executes it on Recurnix's origin. Measured against the shipped code: an SVG containing <script> and onload= was accepted end to end and handed back a live URL, served 200 image/svg+xml with no Content-Security-Policy.
  • The uploader chose the filename on disk. $ext came from getClientOriginalExtension() — the name the browser sent. The mimes: rule sniffs bytes and says nothing at all about the name, so PNG bytes offered as logo.sh were written as logo-20260731134002.sh. (logo.php was already refused — by Laravel's own php-upload block, not by anything Recurnix did.)
  • public/uploads/ had no .htaccess, and could not have had one. /public/uploads/ was ignored wholesale in .gitignore, so a guard file could exist on one machine and be absent from every install. Directory-level ignores cannot be undone by a later ! rule, so the pattern itself had to change. With no guard in place, a PHP file dropped into public/uploads/branding/ executed — measured, 200, body returned by the interpreter.

Added

  • App\Support\SvgSafety — a string in, a verdict out. It rejects; it does not clean. Eight constructs are refused by name, and the refusal says which one and what to do instead. Sanitising XML correctly means beating namespace aliases, entity expansion, CDATA and every encoding trick invented afterwards; a sanitiser that is 95% right is a vulnerability with a reassuring name, and the person uploading is an administrator who can export a PNG.
  • public/uploads/.htaccess — tracked and shipped. Content-Security-Policy: default-src 'none'; img-src 'self' data:; style-src 'unsafe-inline'; sandbox, nosniff, Content-Disposition: inline, the PHP handler removed, and the executable extensions denied outright. An <img> still renders.
  • Settings::BRAND_EXTENSIONS — the accepted types named once. The validation rule and the on-disk extension are both built from it, so widening one cannot silently widen the other.
  • 26 more committed tests (156 total, 530 assertions).

Changed

  • The extension written to disk now comes from the bytes that were validated ($file->extension()), clamped to BRAND_EXTENSIONS, and the upload fails closed if it is anything else.

Notes

  • Who could do it. Only staff who can reach Settings. It is not a client-side hole and not an account takeover — it is a way for one staff account to run script in another staff member's browser, on the real domain, which is enough.
  • No path from the upload to code execution was found. Laravel refuses the whole php/phtml/phar family by client extension, so the branding upload itself could not plant one. That the directory executed PHP at all is recorded as the separate fact it is: anything that ever wrote there by another route would have been a much larger problem, and now would not be.
  • The clean SVG still works. Checked against Livewire's real TemporaryUploadedFile, not a stand-in: extension() returns svg, mimes: passes, SvgSafety says safe. A guard that quietly broke a working feature would be worse than the hole it closes.
  • A known false positive is recorded as a decision. The event-handler pattern matches on<word>= anywhere in the bytes, including inside a text label. The tighter form — only match inside a tag — is bypassable, because a > inside a quoted attribute value is legal XML and does not close the tag. The loose pattern stays; there is a test for both halves of that choice.

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