Skip to content

Bump soupsieve to fix two selector-matching DoS advisories - #450

Closed
lelia wants to merge 1 commit into
mainfrom
lelia/bump-soupsieve
Closed

lelia wants to merge 1 commit into
mainfrom
lelia/bump-soupsieve

Conversation

@lelia

@lelia lelia commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Upgrades the locked soupsieve (a transitive dependency of beautifulsoup4) from 2.9.2, which fails pip-audit in the Dependency Audit workflow:

  • GHSA-mmhr-3c5m-f64f (high): descendant-combinator matching runs in polynomial time. Fixed in 4.0.
  • GHSA-4j63-6c4x-wfg4 (medium): :has() with the general sibling combinator runs in quadratic time. Fixed in 2.10.

Only uv.lock and CHANGELOG.md change. This rides the unreleased 2.11.15.

Python split

soupsieve 4 requires Python 3.11.5 or later, but we declare requires-python = ">= 3.11". uv therefore resolves:

  • 4.1 on 3.11.5 and later, which fixes both advisories
  • 2.10 on 3.11.0–3.11.4, which fixes only the medium one

Exposure

Neither advisory is reachable from the CLI. Both need a CSS selector (select(), select_one(), css.select()), and the only bs4 usage, in socketsecurity/core/helper/__init__.py, calls find, find_all and the sibling finders.

Testing

  • pip-audit --strict against the uv export, run the same way as CI on Python 3.12: no known vulnerabilities.
  • pytest tests/unit/ tests/core/: 753 passed.
  • uv lock --locked: clean.

pip-audit fails on soupsieve 2.9.2 for GHSA-mmhr-3c5m-f64f (high) and
GHSA-4j63-6c4x-wfg4 (medium). Upgrade it in the lockfile only; it comes
in through beautifulsoup4 and isn't pinned directly.

soupsieve 4 requires Python 3.11.5+, so uv resolves 4.1 there and 2.10
on 3.11.0-3.11.4. 2.10 fixes the medium advisory but not the high one.
The CLI never runs CSS selectors (bs4 is only used with find/find_all),
so neither advisory is reachable.

Rides the unreleased 2.11.15.
@lelia
lelia requested a review from a team as a code owner November 13, 2026 17:08
@cursor

cursor Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Lockfile-only dependency refresh with no CLI code changes; runtime BeautifulSoup usage avoids CSS selector APIs, so exposure was already minimal.

Overview
Updates the locked transitive soupsieve dependency (via beautifulsoup4) in uv.lock from 2.9.2 to address two slow CSS-selector matching advisories (GHSA-mmhr-3c5m-f64f, GHSA-4j63-6c4x-wfg4).

Because soupsieve 4 needs Python 3.11.5+ while the project still supports >=3.11, resolution is split: 4.1 on 3.11.5 and later (both fixes), 2.10 on 3.11.0–3.11.4 (medium advisory only). Lock resolution-markers and beautifulsoup4’s dependency entries were adjusted for that split.

CHANGELOG.md documents the security bump under the unreleased 2.11.15 release. No application code changes—only the lockfile and changelog.

Reviewed by Cursor Bugbot for commit c619644. Configure here.

@lelia
lelia deployed to socket-firewall November 13, 2026 17:08 — with GitHub Actions Active

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c619644. Configure here.

Comment thread CHANGELOG.md
[GHSA-mmhr-3c5m-f64f](https://github.com/advisories/GHSA-mmhr-3c5m-f64f) and
[GHSA-4j63-6c4x-wfg4](https://github.com/advisories/GHSA-4j63-6c4x-wfg4), two
slow CSS-selector matching bugs. The CLI doesn't run CSS selectors, so it
wasn't exposed to either.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changelog restates the soupsieve PR

Low Severity

The 2.11.15 soupsieve note walks through the Python split, why 4.x cannot install, both GHSA IDs, and that the CLI never ran CSS selectors. Users of this release will not see a product, dashboard, or CI-log change from the lockfile bump, and the text also treats both advisories as fixed on every supported Python even though 2.10 still has GHSA-mmhr-3c5m-f64f.

Fix in Cursor Fix in Web

Triggered by learned rule: CHANGELOG is user-facing — short bullets only

Reviewed by Cursor Bugbot for commit c619644. Configure here.

@lelia lelia closed this Nov 13, 2026

This branch was successfully deployed

1 active deployment
socket-firewall — c6196441 Deployed Nov 13, 2026 by lelia via python-sfw-smoke-enterprise #579
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