Services
Laravel upgrades & security hardening
Who this is for
Teams and businesses with a Laravel application that works, but is falling behind. Common signs:
- it’s on a Laravel version that no longer receives security fixes;
composer updatefails, orcomposer auditlists vulnerabilities nobody has had time to fix;- developers avoid certain parts of the code because they break unpredictably;
- there are few or no automated tests, so deploys are nervous;
- a security questionnaire from a customer or insurer is asking questions you can’t confidently answer.
Why out-of-date Laravel is a security risk
Each major Laravel release receives security fixes for two years. After that, new vulnerabilities in the framework — and in the packages that drop support for old versions — stay unpatched. At the time of writing, Laravel 11 and every earlier release are outside security support, and many applications we see are older still, often also running on an unsupported PHP version.
The longer an upgrade waits, the harder it gets: each skipped version adds changes to routing, configuration, authentication and dependencies, and the packages you rely on move on without you.
Our Laravel upgrade process
- Review — read the codebase, list the dependencies and their upgrade paths, and identify abandoned packages and customisations that will fight the upgrade.
- Make it safe — add feature tests around logins, payments, key workflows and anything that has broken before. Set up a repeatable deployment if there isn’t one.
- Upgrade PHP — move to a supported PHP version, usually first, because new Laravel versions require it.
- Upgrade Laravel one version at a time — work through each release’s upgrade guide, replace deprecated features and swap abandoned packages for maintained ones. Tools such as Rector help with mechanical changes; every change is still reviewed by a person.
- Adopt the current structure — where it pays off, move to the current application skeleton so future upgrades are small.
- Keep it current — an optional maintenance arrangement for dependency updates, security patches and the next major release.
We’ve upgraded Laravel applications across many major versions since Laravel 4.2. This website was moved from Laravel 10 to Laravel 13 using the same approach: remove what’s no longer needed, adopt the current structure and keep every existing URL working.
Laravel security hardening
Alongside the upgrade we review the security issues we most often find in real Laravel applications:
- Debug mode in production —
APP_DEBUG=trueexposes environment variables and stack traces, and older versions of the Ignition error page had a remote code execution vulnerability (CVE-2021-3129). - A leaked or reused
APP_KEY— an application key committed to a repository or shared between environments lets an attacker forge encrypted cookies and, in some configurations, execute code. We check for leaks and rotate keys safely. - Mass assignment — models with
$guarded = []or broad$fillablelists that let users set fields such asis_adminorteam_id. - Missing authorisation — controllers, Livewire components and API routes that check a user is logged in but not that they own the record they’re changing.
- Raw queries —
DB::raw,whereRawandorderBybuilt from request input. - Unescaped output —
{!! !!}in Blade templates rendering user content. - Account takeover through profile forms — changing an account’s email address is effectively changing its password, one reset email later. Stock profile scaffolding typically updates the email straight away, without asking for the current password, verifying the new address first or warning the old one. We add re-authentication, verification of the new address, a notice with a revoke link to the old one, and logging out other sessions.
- Rate limiting — on login, password reset, two-factor and contact forms.
- File uploads and storage — validated types, private disks and signed URLs for anything that isn’t public.
- Server configuration — the NGINX and PHP settings in front of the application. See our PHP & NGINX security audit.
Reducing technical debt
We don’t refactor for its own sake. Technical debt is worth paying down where it costs you something: features that take too long, bugs that keep coming back, or code that hides security problems. Typical work includes:
- replacing abandoned or forked packages with maintained alternatives;
- moving business logic out of controllers and views into classes that can be tested;
- adding static analysis (Larastan / PHPStan) and a consistent code style so problems are caught before review;
- moving slow work onto queues, with retries and failure handling;
- removing dead code, unused routes and features nobody uses;
- continuous integration that runs the tests and checks dependencies on every change.
Relevant experience
We run our own Laravel product, PaidProper, on the current Laravel release, with team accounts, Stripe billing and a Xero integration — so we deal with upgrades and security patches first-hand, not just for clients. For clients we take on maintenance of Laravel and PHP applications other people have built, often after the original developer has left.
How an engagement usually works
It starts with a code review and a written upgrade and security plan, with each step estimated. You decide where to start; we deliver in small releases. Many clients then keep us on for ongoing maintenance so the application never falls this far behind again. If your application isn’t on Laravel at all, see migrating to Laravel.
Common questions
Which Laravel versions are still supported?
Can you upgrade across several Laravel versions at once?
How long does a Laravel upgrade take?
Do we need to stop feature work during the upgrade?
What is technical debt and is it worth paying down?
Is upgrading Laravel enough to make the application secure?
Related services
-
Modern Laravel and PHP development for new applications, existing systems and long-term products.
-
Legacy PHP & Laravel modernisation
Improve and extend existing PHP and Laravel systems without throwing away valuable business logic. -
PHP & NGINX security audit
Find the vulnerabilities in your PHP application, PHP-FPM and NGINX configuration before someone else does, with a prioritised fix list.
Related insights
- Laravel vs WordPress — Laravel and WordPress compared from a developer’s point of view, and why we usually choose Laravel for web applications.
Contact