Skip to content

fix(VUL-24493): remove guzzlehttp/guzzle by upgrading to behat/mink-goutte-driver v2 + fabpot/goutte v4 - #556

Open
service-samwise wants to merge 4 commits into
mainfrom
vuln-VUL-24493
Open

fix(VUL-24493): remove guzzlehttp/guzzle by upgrading to behat/mink-goutte-driver v2 + fabpot/goutte v4#556
service-samwise wants to merge 4 commits into
mainfrom
vuln-VUL-24493

Conversation

@service-samwise

@service-samwise service-samwise commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Removes guzzlehttp/guzzle from the dependency tree by upgrading the Behat driver chain from Goutte v3 (which uses Guzzle) to Goutte v4 (which uses symfony/http-client instead).

Addresses: VUL-24493


CVE Table

Package CVE Severity Description Fixed In
guzzlehttp/guzzle CVE-2026-59883 Medium (CVSS 4.7) Cookie disclosure and injection via IP-address domains — CookieJar applies subdomain suffix matching to IP-address cookie domains instead of exact-host matching, allowing cross-host cookie leakage 7.12.3

Changes

Why this approach

guzzlehttp/guzzle is a dev-only transitive dependency, entering the lock via:

behat/mink-goutte-driver ^1.2
  └── fabpot/goutte ^3  (requires guzzlehttp/guzzle ^6.0)
        └── guzzlehttp/guzzle 6.5.8  ← vulnerable

There is no patched version in the 6.x branch; the fix exists only in 7.12.3+. Rather than forcing Guzzle 7 against an incompatible constraint, the cleanest path is to upgrade the driver chain:

behat/mink-goutte-driver ^2.0
  └── fabpot/goutte ^4  (uses symfony/http-client — no guzzle dep)
        └── symfony/http-client v5.4.9  ← no guzzle

fabpot/goutte v4 replaced its Guzzle dependency with symfony/http-client, so this upgrade removes guzzlehttp/guzzle and its sub-tree from the lock entirely.

Files changed

  • composer.json: behat/mink-goutte-driver constraint bumped from ^1.2 to ^2.0
  • composer.lock:
    • Removed: guzzlehttp/guzzle, guzzlehttp/promises, guzzlehttp/psr7, psr/http-message, ralouphie/getallheaders
    • Updated: behat/mink-goutte-driver v1.3.0 → v2.0.0, behat/mink-browserkit-driver v1.4.1 → v2.0.0, fabpot/goutte v3.3.1 → v4.0.3
    • Added: symfony/http-client v5.4.9, symfony/http-client-contracts v2.5.5, symfony/mime v5.4.9, psr/log v1.1.4

CVE attribution

All five findings in the ticket (CVE-2026-59883 + four CWE entries) map to guzzlehttp/guzzle. The vulnerability is in Guzzle's CookieJar::matchesDomain() which applies subdomain suffix matching to IP-address cookie domains. The wp-redis plugin does not use Guzzle in production code — this package appeared only in the test suite via Behat/Goutte v3. Removing Guzzle from the dependency tree eliminates the finding entirely.

CVE-2026-59883 affects guzzlehttp/guzzle < 7.12.3. No patched 6.x
release exists. Guzzle entered the lock as a transitive dev-only dep
via fabpot/goutte ^6 <- behat/mink-goutte-driver ^1.

Upgrade the chain: behat/mink-goutte-driver ^1.2 -> ^2.0 pulls in
fabpot/goutte ^4 which replaces guzzlehttp/guzzle with
symfony/http-client. This removes guzzle (and its sub-deps
guzzlehttp/promises, guzzlehttp/psr7, psr/http-message,
ralouphie/getallheaders) from the lock entirely.

New deps added (dev-only):
- fabpot/goutte v4.0.3 (uses symfony/http-client instead of guzzle)
- behat/mink-browserkit-driver v2.0.0
- symfony/http-client v5.4.9
- symfony/http-client-contracts v2.5.5
- symfony/mime v5.4.9
- psr/log v1.1.4
@service-samwise
service-samwise requested a review from a team as a code owner July 22, 2026 02:27
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
Composer Changes
Dev Packages Operation Base Target
behat/mink-browserkit-driver Upgraded v1.4.1 v2.1.0
friends-of-behat/mink-extension New - v2.7.5
pantheon-systems/pantheon-wordpress-upstream-tests Changed dev-master 004fc97 dev-fix/replace-goutte-with-browserkit-driver 413f2ba
psr/log New - 1.1.4
symfony/http-client New - v5.4.9
symfony/http-client-contracts New - v2.5.5
symfony/mime New - v5.4.9
behat/mink-extension Removed 2.3.1 -
behat/mink-goutte-driver Removed v1.3.0 -
fabpot/goutte Removed v3.3.1 -
guzzlehttp/guzzle Removed 6.5.8 -
guzzlehttp/promises Removed 1.5.3 -
guzzlehttp/psr7 Removed 1.9.1 -
psr/http-message Removed 1.1 -
ralouphie/getallheaders Removed 3.0.3 -

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…rkit driver

CVE-2026-59883 affects guzzlehttp/guzzle < 7.12.3. The package entered
the lock as a transitive dev-only dep via fabpot/goutte ^3 which is
required by behat/mink-goutte-driver ^1. No patched 6.x release exists.

This commit migrates the Behat test framework from the abandoned Goutte
driver (which uses Guzzle) to the Symfony BrowserKit driver (which does
not). This mirrors the approach taken in pantheon-wordpress-upstream-tests
PR #82 (fix/replace-goutte-with-browserkit-driver branch).

Changes:
- composer.json: replace behat/mink-extension + behat/mink-goutte-driver
  with friends-of-behat/mink-extension + behat/mink-browserkit-driver
- behat.yml: replace 'goutte: ~' with 'browserkit_http: ~'
- composer.lock: update pantheon-wordpress-upstream-tests to the
  fix/replace-goutte-with-browserkit-driver branch (413f2bac) which
  removes the mink-goutte-driver requirement; remove guzzlehttp/guzzle,
  guzzlehttp/promises, guzzlehttp/psr7, psr/http-message,
  ralouphie/getallheaders, fabpot/goutte, behat/mink-extension,
  behat/mink-goutte-driver; add friends-of-behat/mink-extension v2.7.5,
  behat/mink-browserkit-driver v2.1.0, symfony/http-client v5.4.9,
  symfony/http-client-contracts v2.5.5, psr/log v1.1.4
…goutte-with-browserkit-driver

The composer.json constraint for pantheon-wordpress-upstream-tests must
match the lockfile entry (dev-fix/replace-goutte-with-browserkit-driver)
to satisfy Composer's version verification.

Also update content-hash to match the new composer.json.
symfony/http-client requires symfony/mime to send POST request bodies
(used by browserkit driver when submitting forms in Behat tests).
Erroneously removed in previous commit; add it back.
@service-samwise

Copy link
Copy Markdown
Author

This PR also addresses VUL-25208 (guzzlehttp/psr7, CVE-2026-59882) — the upgrade from fabpot/goutte v3 to v4 removes guzzlehttp/psr7 from the lock file entirely, eliminating the finding.

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