Skip to content

security: upgrade pyo3 to 0.24.x and patch transitive vulnerabilities (python bindings)#7

Merged
vahmo merged 2 commits into
masterfrom
security/python-bindings-remediation
May 29, 2026
Merged

security: upgrade pyo3 to 0.24.x and patch transitive vulnerabilities (python bindings)#7
vahmo merged 2 commits into
masterfrom
security/python-bindings-remediation

Conversation

@vahmo
Copy link
Copy Markdown
Contributor

@vahmo vahmo commented May 29, 2026

Summary

Hardens the standalone bindings/python crate, whose separate Cargo.lock was not covered by PR #5. cargo audit on that lock now reports 0 vulnerabilities (was 4).

Advisories cleared

Crate From → To Advisory Severity
pyo3 0.22.6 → 0.24.2 RUSTSEC-2025-0020 — PyString::from_object buffer overflow low
rustls-webpki 0.103.x → 0.103.13 RUSTSEC-2026-0104 — CRL-parse panic High
rustls-webpki RUSTSEC-2026-0098 / -0099 — name-constraint bypass low
rand 0.9.4 / 0.8.6 rng() unsoundness low

PyO3 0.22 → 0.24 — minimal break

Kept abi3-py38 (0.24 still supports Python 3.8; 0.25+ drops it), so the wheel stays cp38-abi3 — no loss of 3.8 support. The binding was already on the Bound API, so the only changes were the deprecated transitional aliases (no logic change):

  • PyModule::import_boundPyModule::import (1)
  • PyDict::new_boundPyDict::new (4)

Verification

  • cargo audit (python lock) → 0 vulnerabilities
  • maturin buildrdapify_py-…-cp38-abi3-manylinux_2_34_x86_64.whl
  • import rdapify_py → version 0.7.0, all 9 functions present
  • live domain("example.com") → returns RDAP data (entities/events/handle/ldhName/…)

🤖 Generated with Claude Code

vahmo and others added 2 commits May 30, 2026 00:16
Clears all 4 advisories in the standalone bindings/python/Cargo.lock
(cargo audit: 0 vulnerabilities after):

- pyo3 0.22.6 -> 0.24.2 — RUSTSEC-2025-0020 (PyString::from_object buffer
  overflow). Kept the `abi3-py38` feature: 0.24 still supports Python 3.8
  (0.25+ drops it), so the wheel stays cp38-abi3 — no loss of 3.8 support.
- rustls-webpki 0.103.x -> 0.103.13 — RUSTSEC-2026-0104 (CRL-parse panic,
  High) + RUSTSEC-2026-0098/-0099 (cert name-constraint bypasses).
- rand -> 0.9.4 / 0.8.6 — clears the rng() unsoundness notice.

The binding was already on PyO3's Bound API, so the 0.22->0.24 break was
limited to the deprecated transitional aliases (no logic change):
  PyModule::import_bound -> PyModule::import   (1 site)
  PyDict::new_bound      -> PyDict::new        (4 sites)

Verified: `cargo audit` clean; `maturin build` -> cp38-abi3 wheel;
`import rdapify_py` (version 0.7.0, all 9 functions present) and a live
`domain("example.com")` lookup both succeed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The wheel was tagged 0.4.0 while the crate's __version__ (from CARGO_PKG_VERSION)
and the rest of the ecosystem are 0.7.0. Align pyproject.toml so built wheels
are tagged rdapify_py-0.7.0-cp38-abi3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vahmo vahmo merged commit f54a6ca into master May 29, 2026
8 checks passed
@vahmo vahmo deleted the security/python-bindings-remediation branch May 29, 2026 21:32
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