Repository navigation
fix: harden PHP request parsing (post_max_size, max_input_nesting_level) - #586
oc-tmueller wants to merge 3 commits into
Conversation
post_max_size no longer follows OWNCLOUD_MAX_UPLOAD (20G). It defaults to 100M, below a quarter of the 512M memory_limit as Freexian recommends after CVE-2026-109618/-109619, is configurable with the new OWNCLOUD_POST_MAX_SIZE, and is enforced with php_admin_value so that ownCloud's .htaccess cannot raise it. max_input_nesting_level drops to 6, and expose_php = Off is made explicit. File uploads use WebDAV PUT and are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
A value with a space no longer breaks Apache's config parsing. On ownCloud 10, .htaccess pins memory_limit to 512M and upload_max_filesize to 513M, so the environment variables do not set those there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
GHSA-6wmf-4rv5-p3rp names session upload progress as the confirmed mod_php attack path for CVE-2026-109619 and recommends keeping it off after patching. Nothing in ownCloud core or its bundled apps uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
Compatibility with ownCloud 10.16.6 and 11.0.1All checks below ran on images built from Acceptance testsThe full API and CLI acceptance suites passed on both lines with no regressions. Every scenario that came out differently from the published images is Uploads and form parsingSettings applied on both lines:
The 10.16 web UI uploads with WebDAV WOPI (Collabora / richdocuments)Tested end to end with Collabora CODE 26.04.5.2: richdocuments 4.3.1 on 11.0.1, and 4.2.4 on 10.16.6.
WOPI (Microsoft Office Online)Checked in the source of the Side effects
🤖 Generated with Claude Code |
Post-patch hardening for CVE-2026-109618 / CVE-2026-109619, following Freexian's advice. The fixed PHP introduces a hard memory limit that kills the worker when it is reached, and
post_max_sizeshould stay below a quarter ofmemory_limit. Until nowpost_max_sizefollowedOWNCLOUD_MAX_UPLOAD(20G); on ownCloud 10,.htaccessset it to 513M. Both are above the 512Mmemory_limit.Changes, for both
v22.04andv24.04:OWNCLOUD_POST_MAX_SIZE, default100M. It setspost_max_sizein the ini and is also enforced in the vhost withphp_admin_value, so ownCloud's.htaccessphp_value post_max_size 513Mcan't raise it.upload_max_filesizestays onOWNCLOUD_MAX_UPLOAD.max_input_nesting_level64 → 6.session.upload_progress.enabled = Off. GHSA-6wmf-4rv5-p3rp names it as the mod_php attack path for CVE-2026-109619 and recommends keeping it off after patching. Nothing in core or its bundled apps uses it (searched on 10.16.6 and 11.0.1). It is verified off at runtime under mod_php on both lines.expose_php = Offis now set explicitly. Ubuntu'sphp.inialready had it off, so this changes no behaviour.Verified on local builds of both bases with the 10.16.6 and 11.0.1 server images on top:
post_max_sizeis100Mon both. On 10.16,.htaccessno longer wins: the published image reports513M, and the published 11.0.1 reports20G.OWNCLOUD_POST_MAX_SIZE=200Mgives200M.max_input_nesting_levelis6(published: 64). NoX-Powered-Byheader.PUTreturns 201 with the full size. A form POST to the OCS share API succeeds.php://input(tested on PHP 7.4 and 8.3), so WOPI-style saves keep working.Known side effects:
min(upload_max_filesize, post_max_size). Uploads themselves are chunked WebDAVPUTand not limited by it.v20.04, which CI does not build, is left unchanged.🤖 Generated with Claude Code