Skip to content

chore(security): suppress CVE-2026-8328 (ftplib.ftpcp SSRF) until 3.14.6 - #4072

Merged
LearningCircuit merged 1 commit into
mainfrom
fix/grype-cve-2026-8328-ftplib
May 17, 2026
Merged

LearningCircuit merged 1 commit into
mainfrom
fix/grype-cve-2026-8328-ftplib

Conversation

@LearningCircuit

Copy link
Copy Markdown
Owner

Summary

Grype is alerting on CVE-2026-8328 against the python:3.14.5-slim base image (medium / CVSS 5.9, SSRF in ftplib.ftpcp()). This PR adds a justified suppression to .grype.yaml, matching the existing pattern for CPython CVEs whose upstream fix has merged but where no fixed Python release exists yet.

What the CVE is. ftplib.ftpcp() is an undocumented helper that copies a file from one FTP server to another. When the source server replies to PASV, the function passed the raw host:port from that reply straight to target.sendport() — so a malicious source server could redirect the second FTP connection to an internal host (SSRF). It's the same class as CVE-2021-4189, whose original fix added trust_server_pasv_ipv4_address to ftplib.FTP but left ftpcp() unpatched.

Upstream status. The fix was merged to the CPython 3.14 branch on 2026-05-13, three days after Python 3.14.5 was tagged (2026-05-10). No 3.14.6 release exists yet, so we cannot bump our base image to get the fix today.

Why suppression is correct, not a workaround. ftplib is not imported anywhere in this project:

$ grep -rn "ftplib\|ftpcp\|FTP(" src/
(no matches)

No transitive dependency in pdm.lock brings in an FTP client either — crawl4ai, requests, httpx, etc. are all HTTP-only. The vulnerable ftpcp() function is therefore unreachable from this image regardless of base-image state. This is consistent with the existing entries in the python3.14 block of .grype.yaml (CVE-2026-6100, -4786, -1502, -6019), all of which are "fix merged upstream, awaiting next release, codepath unreachable here."

Cleanup. The suppression will be removed in the same PR that bumps the Python base image to 3.14.6 (or later), alongside the other entries in that block.

Test plan

  • Next Grype scan run (release-gate or weekly scan workflow) reports CVE-2026-8328 as suppressed rather than as a new alert against /usr/local/bin/python3.14.
  • No other Grype findings regress (the change is additive — one new entry, no other modifications).

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
@LearningCircuit
LearningCircuit merged commit 0fe3c8c into main May 17, 2026
14 checks passed
@LearningCircuit
LearningCircuit deleted the fix/grype-cve-2026-8328-ftplib branch May 17, 2026 00:33
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

Overall: Clean, well-justified vulnerability suppression that follows the established pattern in .grype.yaml. The reachability analysis and upstream fix references are exemplary.

🔒 Security

  • No security concerns identified. The suppression is appropriately scoped with a solid reachability justification (ftplib unused in src/ and dependencies), references the upstream merge commit, and explicitly notes removal criteria (Python 3.14.6+ bump).

Code Quality & Best Practices

  • Excellent audit trail: The reason string includes CVSS score, CVE class, upstream PR reference, merge date, release timeline, and reachability analysis — matching the high standard set by existing entries.
  • Correct placement: Inserted within the Python CVE block (before the coreutils section), maintaining logical grouping.
  • Cleanup commitment: PR description explicitly states this suppression will be removed alongside the next Python base image bump, preventing configuration drift.

CI Status

  • No failing checks visible. gitleaks and pre-commit passed. Pending scans (osv-scan, mypy-analysis, etc.) are expected for this type of configuration change.

✅ Approved


Review by Friendly AI Reviewer - made with ❤️

@github-actions github-actions Bot added security Security fix or hardening. Release notes: Security Updates (1/20, highest precedence). ci-cd CI/CD pipeline, GitHub Actions, or build changes. Release notes: CI/CD & Maintenance (8/20). configuration Configuration or settings changes. Release notes: ⚙️ Configuration (priority 12/20). labels May 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Metric Value
Line Coverage 93.4%
Branch Coverage 88.2%
Lines 42,851 / 45,887
Files Analyzed 503

📈 View Full Report (updates after merge)

📉 Coverage Details

Files needing attention (<50% coverage):

  • benchmarks/datasets.py: 0.0%
  • benchmarks/metrics.py: 0.0%
  • web_search_engines/rate_limiting/__main__.py: 0.0%
  • journal_quality/db.py: 39.4%
  • journal_quality/data_sources/jabref.py: 40.0%

  • Coverage is calculated from src/ directory
  • Full interactive HTML report available after merge to main/dev
  • Download artifacts for immediate detailed view

LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
LearningCircuit added a commit that referenced this pull request Jun 22, 2026
…4.6 (#4072)

Grype alerts on CVE-2026-8328 against python:3.14.5-slim. The
vulnerability is an SSRF in the undocumented ftplib.ftpcp() helper —
the same PASV-trust class as CVE-2021-4189, whose original 2021 fix
only patched ftplib.FTP and left ftpcp() unprotected.

Upstream merged the fix to the CPython 3.14 branch on 2026-05-13
(python/cpython#149793), three days after Python 3.14.5 was tagged.
No 3.14.6 release exists yet, so a base-image bump isn't an option.

Not exploitable here: `grep -rn "ftplib\|ftpcp" src/` returns zero
hits, and no transitive dependency imports ftplib either, so
ftpcp() is unreachable from this image.

Added to .grype.yaml in the existing python3.14 block alongside the
other CPython CVEs awaiting the next 3.14.x point release. The
suppression auto-cleans when the next Python bump picks up 3.14.6+.
@LearningCircuit LearningCircuit added the follow-up-issues-extracted All eligible follow-up issues have been extracted from the PR review label Aug 7, 2026

This branch was previously deployed

1 inactive deployment
ci — e31572d6 Deployed May 17, 2026 by LearningCircuit via All Pytest Tests + Coverage #6985
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD pipeline, GitHub Actions, or build changes. Release notes: CI/CD & Maintenance (8/20). configuration Configuration or settings changes. Release notes: ⚙️ Configuration (priority 12/20). follow-up-issues-extracted All eligible follow-up issues have been extracted from the PR review security Security fix or hardening. Release notes: Security Updates (1/20, highest precedence).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant