Skip to content

fix(laravel): require patched symfony/http-foundation and add a Composer cooldown - #117

Merged
MahmoudElsayad merged 2 commits into
mainfrom
security/nov9-laravel-symfony
Nov 11, 2026
Merged

MahmoudElsayad merged 2 commits into
mainfrom
security/nov9-laravel-symfony

Conversation

@MahmoudElsayad

@MahmoudElsayad MahmoudElsayad commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Laravel example pins symfony/http-foundation to 7.3.7, which is affected by GHSA-r925-mgvr-h9cc, a ReDoS in HeaderUtils::split() through the Cache-Control header. Dependabot reports it in alert 1867 (https://github.com/PSPDFKit/nutrient-web-examples/security/dependabot/1867). Version 7.4.19 fixes that advisory. But packagist published four more advisories on November 4 that affect 7.4.19 to 7.4.22. Composer refuses those versions, so 7.4.23 is the first version that the example can use.

What changed

composer.json replaces the exact 7.3.7 pin with ^7.4.23, and it adds a seven-day Composer cooldown through config.policy.cooldown.period. The README now asks for Composer 2.11 or later, because 2.11 is the first release that enforces the cooldown. I checked Composer 2.8.8, 2.9.8 and 2.10.3, and all three ignore the setting.

composer.lock comes from a full composer update with Composer 2.11.2 under the cooldown, because a targeted update of symfony/http-foundation left 12 advisories in laravel/framework, league/flysystem, symfony/http-kernel, symfony/mime, symfony/routing and symfony/yaml. The update moves 70 packages, including laravel/framework 12.62.0 to 12.71.0 and symfony/http-foundation 7.3.7 to 7.4.23.

How I tested it

  • composer audit --locked reports no advisories.
  • On a clean checkout, I followed the README: composer install, .env copy, php artisan key:generate, npm install, npm run dev and php artisan serve, with PHP 8.5 and Composer 2.11.2 in Docker.
  • In Chrome, the viewer renders document.pdf, .PSPDFKit-Error stays hidden, and the page logs no errors. The shared browser suite excludes the Laravel example, so CI does not cover this.
  • Biome passes for composer.json.

Open question

The example ships composer.phar 2.8.8, which ignores the cooldown, but the README tells readers to install Composer themselves. Do we still need the bundled composer.phar, or can I remove it in this PR?

…er cooldown

7.3.7 is affected by GHSA-r925-mgvr-h9cc. Releases 7.4.19 to 7.4.22 fix it but
carry four advisories that packagist published on November 4, so 7.4.23 is the
first version that Composer accepts. The seven-day cooldown needs Composer 2.11
or later. composer.lock follows once 7.4.23 clears the cooldown.
@MahmoudElsayad MahmoudElsayad self-assigned this Nov 9, 2026
@MahmoudElsayad
MahmoudElsayad marked this pull request as ready for review November 11, 2026 13:38
@MahmoudElsayad
MahmoudElsayad requested a review from a team as a code owner November 11, 2026 13:38

@sc0 sc0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving in advance - all in all looks good, but merging it without composer.lock will break compose install.

"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.7",
"symfony/http-foundation": "7.3.7"
"symfony/http-foundation": "^7.4.23"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[High] Update composer.lock before merging

The committed composer.lock still selects symfony/http-foundation v7.3.7, which does not satisfy the new ^7.4.23 requirement. Composer rejects this mismatch, so the README's composer install step fails on a clean checkout, and the patched dependency is not delivered.

ELI5: The two dependency lists disagree, so new users cannot install the example.

Fix: Regenerate and commit composer.lock using Composer 2.11+ with the seven-day cooldown enabled before merging. Then verify a clean composer install, run composer audit --locked, and smoke-test the viewer.

@MahmoudElsayad MahmoudElsayad Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a76591b. I went with a full composer update instead of just symfony/http-foundation, because the targeted update still left 12 advisories in laravel/framework, league/flysystem and other Symfony packages. composer audit --locked is clean now, and the README steps on a clean checkout load the viewer without errors.

The lock still pinned symfony/http-foundation v7.3.7, which fails the
^7.4.23 constraint, so composer install rejected a clean checkout.
Regenerated with Composer 2.11.2 under the seven-day cooldown. A full
update also clears the 12 other advisories that composer audit reported
in laravel/framework, league/flysystem, and symfony components.
@MahmoudElsayad
MahmoudElsayad merged commit 7818bb7 into main Nov 11, 2026
3 checks passed
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.

2 participants