Skip to content

[Aikido] Fix 2 security issues in regex, wrapt - #715

Open
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/AIK-19648-update-packages-109364923-a9uz
Open

aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/AIK-19648-update-packages-109364923-a9uz

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Fixes memory-safety flaws enabling heap out-of-bounds writes and out-of-bounds access via crafted regex (regex), and use-after-free/double-free races on free-threaded Python (wrapt), risking crashes and memory corruption.

⚠️ Breaking changes analysis not available for: regex

✅ No breaking changes for: wrapt

✅ 2 CVEs resolved by this upgrade

This PR will resolve the following CVEs:

Issue Severity           Description
AIKIDO-2026-447516
MEDIUM
[regex] Crafted regular expressions can trigger heap out-of-bounds writes during pattern compilation and out-of-bounds memory access during matching, enabling memory corruption and potential code execution.
AIKIDO-2026-418522
MEDIUM
[wrapt] Concurrent field swaps in wrapt's C object proxy on free-threaded Python builds cause double releases and use-after-free of borrowed references, corrupting interpreter memory and typically crashing the process (denial of service).
🤖 Remediation details

Fix security vulnerabilities in regex and wrapt by narrowing requires-python and updating dependency specs

Short summary

This PR remediates vulnerabilities in two direct dependencies — regex and wrapt — declared in pyproject.toml. The previous version constraints allowed Python-version-conditional forks of both packages to resolve to vulnerable versions in poetry.lock (specifically regex 2024.11.6 for Python <3.10 and wrapt 1.17.3 for Python 3.8). The fix narrows the project's requires-python to >=3.10,<3.16, eliminating the Python version ranges for which no patched release exists, and updates both dependency specs to unconditionally require patched versions. The asyncpg dev dependency's now-dead <3.9 conditional fork was also collapsed as a side effect.

regex

regex was declared as a three-way Python-conditional array, with ^2024.5.15 for Python <3.10. Versions up to and including 2026.7.19 are vulnerable, and patched releases of regex require Python >=3.10, meaning the <3.10 fork could never resolve to a safe version. The fix narrows requires-python to >=3.10 so the vulnerable fork is no longer generated, and collapses the declaration to a single unconditional ^2026.8.31 spec. The lockfile now resolves regex 2026.9.29 for Python 3.10 and regex 2026.11.25 for Python >=3.11 — both above the vulnerable ceiling.

wrapt

wrapt was declared as a three-way Python-conditional array, with ^1.17.2 for Python <3.9. Versions 1.17.0 through 2.3.0 are vulnerable, and the patched wrapt >=2.4.0 requires Python >=3.9, so the Python 3.8 fork was permanently stuck in the vulnerable range. Narrowing requires-python to >=3.10 removes the Python 3.8 environment from scope entirely, and the declaration is collapsed to a single unconditional ^2.4.0 spec. The lockfile now resolves a single wrapt 2.5.2 entry covering all supported Python versions with no vulnerable fork remaining.

Version changes

Package From To Why updated
regex ^2024.5.15 (py<3.10) / ^2026.8.31 (py>=3.10) ^2026.8.31 (unconditional) Direct CVE fix; vulnerable fork for py<3.10 eliminated by narrowing requires-python
regex (lockfile, py<3.10) 2024.11.6 removed Vulnerable instance removed; Python <3.10 no longer in supported range
regex (lockfile, py==3.10) 2026.9.29 2026.9.29 Retained; already patched
regex (lockfile, py>=3.11) 2026.11.25 2026.11.25 Retained; already patched
wrapt ^1.17.2 (py<3.9) / ^2.4.0 (py>=3.9) ^2.4.0 (unconditional) Direct CVE fix; vulnerable fork for py3.8 eliminated by narrowing requires-python
wrapt (lockfile, py==3.8) 1.17.3 removed Vulnerable instance removed; Python 3.8 no longer in supported range
wrapt (lockfile) 2.5.2 2.5.2 Retained; already patched
python (requires-python) >=3.8,<3.16 >=3.10,<3.16 Narrowed to exclude Python versions incapable of receiving patched regex (>=3.10) and wrapt (>=3.9)
asyncpg (dev) ^0.30.0 (py<3.9) / ^0.31.0 (py>=3.9) ^0.31.0 (unconditional) Dead <3.9 conditional fork collapsed after requires-python narrowed to >=3.10

@aikido-autofix aikido-autofix Bot changed the title [Aikido] Fix 2 security issues in wrapt, regex [Aikido] Fix 2 security issues in regex, wrapt Nov 5, 2026
@aikido-autofix
aikido-autofix Bot force-pushed the fix/AIK-19648-update-packages-109364923-a9uz branch 2 times, most recently from 395922f to abce7c4 Compare November 7, 2026 01:40
@aikido-autofix
aikido-autofix Bot force-pushed the fix/AIK-19648-update-packages-109364923-a9uz branch from abce7c4 to dd61fc7 Compare November 26, 2026 03:21

This branch has not been deployed

No deployments
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.

0 participants