Skip to content

fix(docker): pin PHP 8.2.35 for php2shell CVEs - #60

Merged
ardelato merged 1 commit into
hermesfrom
fix/php2shell-cves
Oct 22, 2026
Merged

ardelato merged 1 commit into
hermesfrom
fix/php2shell-cves

Conversation

@ardelato

Copy link
Copy Markdown
Collaborator

Description

Pins the PHP base image to php:8.2.35-fpm, which fixes CVE-2026-109618 and CVE-2026-109619 ("php2shell"). Both are unauthenticated RCEs in PHP itself, rated 9.2, and they're already being exploited in the wild. Any PHP-FPM setup serving web traffic is exposed, so this is a PHP version bump and not an app code change.

We were on the floating php:8.2-fpm tag, and images only build on pushes to hermes. The last one was from #59 on Aug 14, so prod is still running PHP from August. Pinning the exact version means the build can't land on a cached or stale 8.2-fpm layer, and the image gets a new SHA tag so the IfNotPresent pull policy actually picks it up.

Changes

  • Base image: php:8.2-fpm → php:8.2.35-fpm in both stages of docker/production/Dockerfile.prod and in docker/development/Dockerfile.
  • Stopgap ini: the prod image now sets session.upload_progress.enabled=0 in conf.d/zz-security.ini. That's the code path behind CVE-2026-109619, and an unauthenticated POST can reach it before Laravel runs. Laravel keeps its own sessions and never uses PHP's native ones, so nothing depends on it. It's only there in case an older image gets deployed by mistake.

Advisory: https://www.tenable.com/blog/php2shell-cve-2026-109618-cve-2026-109619-frequently-asked-questions-about-critical-php-remote

QA Notes

qa_req 0 I already tested this on the test cluster.

After the deploy, php -v in a restarters pod should show 8.2.35, and php -r 'echo ini_get("session.upload_progress.enabled");' should print 0.

Pin the base image to php:8.2.35-fpm, which fixes CVE-2026-109618
and CVE-2026-109619 (unauthenticated RCE). The floating 8.2-fpm tag
left the production image on whatever PHP was current at the last
build in August.

Also disable session.upload_progress in the production image as
defense in depth for CVE-2026-109619; Laravel doesn't use native PHP
sessions, so nothing relies on it.
@ardelato
ardelato merged commit 02924a8 into hermes Oct 22, 2026
@ardelato
ardelato deleted the fix/php2shell-cves branch October 22, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant