Skip to content
Introducing AI OS for Business & School — our most powerful products yet.Explore →
App Corp iconApp Corp
Engineering
Laravel
CodeIgniter
Symfony

Laravel, CodeIgniter & Custom PHP Exposure

Laravel, CodeIgniter or Custom PHP? Assessing Your Exposure and Migration Options After PHP2Shell

AE

App Corp Engineering

Editorial Team

October 31, 202613 mins read
13 mins readRead time
1,298Words
Oct 2026Published

This free scan includes a PHP2Shell runtime check

Fixed in 8.5.12, 8.4.27, 8.3.36, 8.2.35. Reviewed 27 October 2026.

What to do now
App Corp Engineering·Editorial Team
Last updated 2026-10-31

What is Laravel, CodeIgniter & Custom PHP Exposure?

PHP2Shell is a pair of critical PHP interpreter vulnerabilities, CVE-2026-109618 and CVE-2026-109619, both scoring 9.2 on CVSS v4.0 and allowing unauthenticated remote code execution. The flaw fires during fatal out-of-memory errors in the middle of a request, so it runs before any framework code loads and no PHP framework can intercept it.

Every PHP framework is affected by PHP2Shell — Laravel, CodeIgniter, Symfony, CakePHP, Yii, Slim, Magento and hand-rolled PHP alike — because the flaw sits in the PHP interpreter itself and triggers before any framework code loads. Framework choice does not change whether you are exposed, but it changes the blast radius: Laravel's APP_KEY, session drivers, upload handling and queue workers all shape what an attacker can do with memory disclosure or code execution. The practical path forward is to score each application with an exposure scorecard, then choose one of three moves — upgrade in place, migrate to TypeScript and Node.js, or strangle the app module by module.

Does PHP2Shell Affect My Framework?

Yes, if your PHP version is vulnerable. PHP2Shell stems from how the PHP engine handles fatal out-of-memory errors in the middle of a request, and Wiz Research showed that even a Hello World script is exploitable on a vulnerable build — a framework cannot intercept a flaw that triggers before it loads. Fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, while PHP 8.1, 8.0 and 7.4 received source-only backports and PHP 7.3 and older received no fix. PHP rates Apache with mod_php as the highest risk configuration, and PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are also affected, so Laravel Octane on FrankenPHP is not exempt. Laravel, CodeIgniter 3 and 4, Symfony, CakePHP, Yii, Slim, Zend/Laminas, Magento and hand-rolled PHP all show up in the wild on affected versions, from PHP 5.x and 7.x legacy installs to current 8.4 deployments.

Laravel: What Is at Stake

Laravel is the most popular modern PHP framework, and its conventions shape what an attacker can reach. Laravel encrypts cookies and session data and signs URLs with APP_KEY, which is loaded into memory on every request; memory disclosure can expose secrets from worker memory, and a leaked APP_KEY lets attackers forge or decrypt cookies, historically even enabling code execution through unserialisation as CVE-2018-15133 showed. Database, Redis, mail, payment and cloud keys in .env files sit in each worker too, along with file, database or Redis sessions that hold user identities, and long-running queue workers and Horizon processes must be restarted after patching. Laravel Octane keeps persistent state between requests on Swoole, RoadRunner or FrankenPHP, which matters for the stale-state class of CVE-2026-109619. After upgrading PHP, restart PHP-FPM, Octane, Horizon and every queue:work process, rotate APP_KEY with APP_PREVIOUS_KEYS so existing encrypted data stays readable, rotate .env credentials, flush the session store, check storage and public directories for unexpected PHP files, and review failed_jobs and logs for anomalies from 20 October onward.

Warning

Rotate APP_KEY carefully: use APP_PREVIOUS_KEYS or plan a re-encryption step, or existing encrypted data and signed URLs will stop working.

CodeIgniter: Risks and Actions

CodeIgniter was popular for its simplicity, and many CodeIgniter 3 applications still run in production, often on old PHP versions that never received a PHP2Shell fix. What is at stake: the encryption_key in config.php used for encrypted sessions and cookies, database credentials in database.php, file-based sessions often stored in a world-readable temp directory, and upload handling that sometimes keeps files inside the web root. Check your PHP version first — if it is 7.3 or older there is no official fix, so isolate the app now. Otherwise upgrade to a fixed build or apply a vendor backport for 7.4, 8.0 or 8.1, rotate encryption_key and database credentials, invalidate sessions, move uploads outside the web root and block PHP execution in upload folders. Note that a CodeIgniter 3 to 4 upgrade is effectively a rewrite because the structure, namespaces and APIs all change, so if you are rewriting anyway, consider rewriting into TypeScript instead.

Symfony, Magento and Other Frameworks

Symfony users should rotate APP_SECRET, which protects CSRF tokens, signed URLs and remember-me cookies, restart Messenger consumers, and check the maintenance status of their Symfony version on the Symfony releases page. CakePHP and Yii installations need security salts and cookie validation keys rotated, plus a check of framework end-of-life dates. Magento and Adobe Commerce are high-value targets because of payment flows: rotate the crypt key in env.php, change admin credentials and payment integration keys, and review PCI DSS obligations. Drupal and Joomla were both exploited by Wiz against default installs, which shows how little an attacker needs to get started. Every one of these frameworks runs on the same vulnerable interpreter, so the framework work is about limiting the damage, not preventing the trigger.

Hand-Rolled Custom PHP

Custom PHP apps, often built in the 2000s and 2010s without a framework, tend to be the most exposed systems in the estate. They commonly run on PHP 5.x or 7.x, where no fix exists for 7.3 and older, keep secrets hard-coded inside PHP files, use mysql_* functions or string-concatenated SQL that adds SQL injection risk on top of PHP2Shell, have no tests and no CI, deploy by FTP, and have no remaining developers who know the code. For these systems upgrading PHP is often harder than migrating, because each PHP major version removed functions the code depends on, including mysql_*, each() and create_function(). Characterization tests plus a rebuild give you a known behaviour baseline; another year of patching a dead codebase does not.

The Exposure Scorecard

Score each application from 1 to 5 on seven factors: PHP version, where a patched 8.4 or 8.5 scores 1 and 7.4 or older scores 5; framework support; internet exposure; data sensitivity; test coverage; secrets hygiene; and team knowledge. A total of 7 to 15 means upgrade in place and monitor. A total of 16 to 25 means plan a migration within 6 to 12 months while hardening now. A total of 26 to 35 means treat the system as critical: isolate it immediately and migrate this quarter. The quadrant chart below plots the same logic, with easy-to-change low-exposure apps monitored and hard-to-change high-exposure apps migrated urgently.

mermaid
quadrantChart
    title Prioritise PHP apps after PHP2Shell
    x-axis Easy to change --> Hard to change
    y-axis Low exposure --> High exposure
    quadrant-1 Migrate urgently
    quadrant-2 Upgrade now
    quadrant-3 Monitor
    quadrant-4 Isolate & plan migration
    "Laravel 11 SaaS": [0.3, 0.75]
    "CI3 portal (PHP 7.2)": [0.85, 0.85]
    "Internal Symfony tool": [0.4, 0.2]
    "Custom PHP 5.6 booking": [0.9, 0.65]

Pro Tip

Score every app the same way, including forgotten staging servers and microsites, which are usually the easiest systems to retire outright.

Migration Options by Framework

Healthy, tested Laravel applications can stay: upgrade PHP and Laravel, and put new modules into TypeScript. Old, untested Laravel apps on PHP 7.x map cleanly onto a TypeScript stack because Eloquent maps to Drizzle, Form Requests to Zod and queues to BullMQ. CodeIgniter 3 should be rebuilt in TypeScript on a pre-built foundation, since moving to CodeIgniter 4 is already a rewrite. Symfony services can be upgraded or strangled into TypeScript thanks to their clean service boundaries, Magento moves to headless commerce with a Next.js storefront to get PHP out of checkout, hand-rolled PHP is best rebuilt with characterization tests, and WordPress-based apps move to Payload CMS with Next.js. The full playbook lives in Replacing Legacy PHP Applications with TypeScript and Node.js, and the phased approach is covered in The Strangler Fig Method.

How App Corp Helps

App Corp is a senior-led engineering studio for custom web development and SaaS platforms on TypeScript, Next.js and PostgreSQL. The engagement starts with a PHP framework exposure audit lasting one to two weeks: a scorecard for every PHP app, a secret rotation plan covering APP_KEY, encryption keys and credentials, and a clear upgrade, migrate or isolate recommendation per application. From there the pre-built path ports your Laravel, CodeIgniter or custom features onto a production-ready TypeScript foundation with auth, RBAC, multi-tenancy, billing, Payload admin, audit logs and CI/CD, which suits portals, SaaS products, internal tools and B2B apps. The custom path handles complex business-critical systems with discovery, characterization tests, a target architecture from our software architecture practice, phased migration with no big-bang cutover, MySQL to PostgreSQL migration, and AI features when you are ready. All of it is sold with fixed, outcome-based pricing and typical first releases in 8 to 12 weeks.

Sources and references

Wiz Research published its PHP2Shell analysis at wiz.io/blog/php2shell-php-rce, and SOCRadar covered CVE-2026-109618 and CVE-2026-109619 at socradar.io/blog. Recorded Future documented exploitation patterns at recordedfuture.com, while Brandefense listed the fixed PHP versions at brandefense.io. BrillMark assessed which WordPress, Laravel and PHP sites are affected at brillmark.com. Laravel publishes its encryption guide and release support policy at laravel.com/docs, and NIST NVD records the historic APP_KEY unserialisation issue as CVE-2018-15133 at nvd.nist.gov. Symfony release status lives at symfony.com/releases, the CodeIgniter 3 to 4 upgrade guide at codeigniter.com, and supported PHP versions at php.net/supported-versions.php.

Migration options by framework

FromRecommended targetWhy
Laravel (modern, tested)Upgrade PHP and Laravel; plan TypeScript for new modulesHealthy apps stay put while new work lands on the modern stack
Laravel (old, untested, PHP 7.x)TypeScript with Next.js, NestJS or route handlers, Drizzle or PrismaConcepts map closely: Eloquent to Drizzle, Form Requests to Zod, queues to BullMQ
CodeIgniter 3TypeScript rebuild on a pre-built foundationCI3 to CI4 is already a rewrite, so TypeScript gets more value from the same effort
SymfonyUpgrade, or strangle into TypeScript servicesClean service boundaries make strangling easier
MagentoHeadless commerce with a Next.js storefrontRemoves PHP from the customer-facing checkout
Hand-rolled PHPTypeScript rebuild with characterization testsUpgrading PHP versions often breaks more than rebuilding
WordPress-based appsPayload CMS with Next.jsA TypeScript-native CMS takes PHP out of the stack entirely

Whenever an upgrade is effectively a rewrite anyway, spend that effort on a modern stack instead.

Conclusion

Framework choice does not protect you from PHP2Shell, but it does decide how much damage a successful exploit can do. Score every PHP application, patch the interpreter and rotate secrets this week, then choose deliberately between upgrading in place and migrating to TypeScript. App Corp runs fixed-scope PHP framework exposure audits and builds migrations on Next.js, NestJS and PostgreSQL with senior engineers and fixed, outcome-based pricing, shipping typical first releases in 8 to 12 weeks.

Frequently Asked Questions

Key Takeaways

  • Every PHP framework is affected because the flaw lives in the PHP interpreter and runs before framework code
  • Framework choice changes the blast radius, not the exposure — APP_KEY, sessions, uploads and queue workers shape the damage
  • Fixed builds are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35; PHP 7.3 and older received no fix
  • Score each app 1 to 5 on seven factors, then upgrade, isolate or migrate based on the total
  • When an upgrade is effectively a rewrite, rebuilding in TypeScript gets more value from the same effort
Ready to migrate?

Order a WordPress to Payload CMS migration

If this series convinced you to move off WordPress, order the migration directly on Contra. A fixed-scope engagement covering the site rebuild, content and media migration, technical SEO foundations, testing, and handover — delivered by the same engineering team that wrote these guides.

$250 fixed priceUp to 3 weeks deliveryUp to 10 pages migrated
Order on Contra

We value your privacy

We use strictly necessary cookies to keep our site secure and functional. With your consent, we also use performance cookies to understand how you interact with our site, and functional cookies to remember your preferences. Read our full Cookie Policy