Repository navigation
Harden PHP config against PHP2Shell (CVE-2026-109619) - #82
Open
travismolick wants to merge 1 commit into
Open
travismolick wants to merge 1 commit into
travismolick wants to merge 1 commit into
Conversation
Earthmark
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PHP2Shell (CVE-2026-109618 and CVE-2026-109619) are two critical bugs in PHP core. They let an unauthenticated attacker run code on the server. PHP fixed them on 2026-10-21 in 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
This PR adds two of the PHP project's recommended stopgaps for CVE-2026-109619 to
.docker/app/php-overrides.ini, as defense in depth:fatal_error_backtraces = 0blocks the confirmed fatal error backtrace path (PHP 8.5).session.upload_progress.enabled = 0blocks the confirmed session upload progress path. Laravel uses its own session handling, not PHP's native upload progress, so the app should not be affected.The real fix is upgrading PHP. The app image uses the floating
php:8.5-fpmtag, which now points to 8.5.12, so the image CI builds after this merges includes the patched PHP.memory_limitstays at 64M. The PHP project suggestsmemory_limit=-1as a stopgap for CVE-2026-109618, but an unlimited limit lets one request use up all memory, and the upgrade fixes the bug properly.Testing
php:8.5-fpmcontainer with the new ini mounted. It reports PHP 8.5.12,session.upload_progress.enabled=0andfatal_error_backtraces=0.Deployment notes
ini_set()and.user.inido not work for this. PHP 8.1 and older get no fix.docker compose build --pull.References