Skip to content

fix(deps): Bump soupsieve to 2.9 for GHSA-gjv8-xp57-g29c - #125178

Merged
oioki merged 1 commit into
masterfrom
fix/bump-soupsieve-2-9-0
Sep 22, 2026
Merged

oioki merged 1 commit into
masterfrom
fix/bump-soupsieve-2-9-0

Conversation

@oioki

@oioki oioki commented Sep 22, 2026

Copy link
Copy Markdown
Member

Bump soupsieve 2.8.4 → 2.9 in uv.lock to close Dependabot alert #719 (GHSA-gjv8-xp57-g29c / CVE-2026-86000).

soupsieve < 2.9 has a polynomial-time ReDoS in its CSS selector parser: the shared IDENTIFIER/VALUE regex places two adjacent quantified groups over overlapping character classes, so a selector that ultimately fails to parse backtracks in O(n²). A few KB of attacker-controlled selector stalls the interpreter for seconds.

Exposure in sentry is nil in practice. soupsieve is only present as a transitive dependency of beautifulsoup4, and every BeautifulSoup use in src/ is hard-coded parsing — get_text() on Jira display names and XML parsing of integration responses. Nothing calls select()/select_one() with user input. This is a hygiene bump to clear the alert.

Lock-only change: beautifulsoup4 4.7.1 requires soupsieve >= 1.2 with no upper bound, so no other resolution moves. soupsieve 2.9 was already on the internal mirror.

Done by hand because Dependabot can't currently regenerate uv.lock for this repo — it runs uv on Python 3.14 and fails on backports-zstd having no cp314 wheel, unrelated to this package.

soupsieve < 2.9 has a polynomial-time ReDoS in its CSS selector parser
(CVE-2026-86000): the IDENTIFIER/VALUE regex backtracks quadratically on
a failing match, so a few KB of attacker-controlled selector stalls the
interpreter for seconds.

Sentry only uses BeautifulSoup with hard-coded parsing (get_text() on
Jira display names, XML responses from integrations) and never passes
user input to select(), so there is no practical exposure. This is a
lock-only bump to close the alert; beautifulsoup4 4.7.1 has no upper
bound on soupsieve.

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 22, 2026
@oioki
oioki marked this pull request as ready for review September 22, 2026 09:48
@oioki
oioki merged commit 377e59d into master Sep 22, 2026
88 checks passed
@oioki
oioki deleted the fix/bump-soupsieve-2-9-0 branch September 22, 2026 10:10
oioki added a commit that referenced this pull request Sep 22, 2026
Add `requires-python = ">=3.13"` to `[project]` in `pyproject.toml`. No
lockfile change — `uv.lock` already records exactly this range.

Every Dependabot security update for `uv.lock` currently fails with:

```
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.14`.
error: No solution found when resolving dependencies for split (markers: sys_platform == 'darwin' or sys_platform == 'linux')
  cause: Because all versions of backports-zstd have no wheels with a matching Python version tag (e.g., `cp314`) and your project depends on backports-zstd, we can conclude that your project's requirements are unsatisfiable.
```

The root cause is the first line: with no `requires-python`, uv derives
the supported range from whichever interpreter runs it. Locally that's
3.13 and everything resolves. Dependabot's runner has Python 3.14.5 (it
doesn't pick up our `.python-version`), so it resolves for `>=3.14` and
correctly fails — `backports-zstd` is a backport of 3.14's stdlib
`compression.zstd`, upstream caps it at `<3.14`, and it has no cp314
wheels for any version. Our internal mirror is already right about this
(`python_versions = <3.14` in `packages.ini`); there is nothing to fix
on that side.

Declaring the range makes `uv lock` deterministic regardless of
interpreter. uv only checks a dependency's `requires-python` against the
project's *lower* bound, so `>=3.13` is compatible with
`backports-zstd`'s `<3.14` exactly as the current lock implies. Verified
by reproducing the failure on clean master with `uv lock --python 3.14`
(CI-pinned uv 0.12.10), then confirming it resolves on both 3.14 and
3.13 with this change and that `uv lock` produces an empty diff.

This also means the lockfile's recorded `requires-python` stops being an
accident of who last ran `uv lock`.

I chose `>=3.13` over `==3.13.*` because it's what the lock already
encodes and doesn't fight the in-progress 3.14 work in the mirror repo.
A follow-up worth doing separately (it changes the lock):
`backports-zstd` should carry a `python_version < "3.14"` marker,
matching how `urllib3[zstd]` declares it — it only exists in our deps
for urllib3's benefit.

This unblocks Dependabot for the open `uv.lock` alerts; #125177 /
#125178 were done by hand because of this.

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants