Repository navigation
fix(security): widen cryptography and msgpack ranges and bump pyarrow floor to resolve Trivy vulnerabilities (#45087) - #45186
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45186 +/- ##
==========================================
+ Coverage 84.70% 84.73% +0.03%
==========================================
Files 3069 3074 +5
Lines 205597 206279 +682
Branches 48327 48336 +9
==========================================
+ Hits 174148 174794 +646
- Misses 28157 28188 +31
- Partials 3292 3297 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| | :--- | :--- | :--- | :--- | :--- | | ||
| | **cryptography** | CVE-2026-69247, CVE-2026-69249, GHSA-537c-gmf6-5ccf, CVE-2026-69248 | HIGH / MEDIUM | `>=48.0.1` (resolved in `50.0.2`) | Used primarily for encrypting database connection passwords at rest and parsing operator-supplied SSL certificates. Unauthenticated external input does not traverse PKCS12 parsing routines. Exploitability in standard deployments is considered low. | | ||
| | **msgpack** | GHSA-6v7p-g79w-8964 | HIGH | `>=1.2.1` (resolved in `1.2.3`) | Utilized internally for SQL Lab asynchronous query result serialization (`RESULTS_BACKEND_USE_MSGPACK`). Raw msgpack byte streams are generated and consumed only within the trusted backend cache boundary. Exploitability requires full cache store compromise. | | ||
| | **pyarrow** | CVE-2026-25087 | HIGH | `>=23.0.1` (resolved in `25.0.1`) | Used for columnar tabular transformations and CSV/Parquet ingestion by authenticated users. Ingestion pathways are governed by role-based permissions and file size limits. Exploitability is bounded to authorized data uploads. | |
There was a problem hiding this comment.
Suggestion: The guide calls 23.0.1 the remediation floor for CVE-2026-25087, while the requirements set 25.0.1; operators following the lower floor may install a release this PR does not treat as remediated.
Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Security
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** docs/admin_docs/security/dependency-vulnerability-remediation.mdx
**Line:** 18:18
**Comment:**
*Security: The guide calls 23.0.1 the remediation floor for CVE-2026-25087, while the requirements set 25.0.1; operators following the lower floor may install a release this PR does not treat as remediated.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fixThere was a problem hiding this comment.
Aligned remediation table floor to >=25.0.1 in commit 0ec4b68.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 0ec4b68.
The pyarrow remediation floor in the guide now reads >=25.0.1, matching the requirements floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of eb21148.
The pyarrow remediation floor in the guide now reads >=25.0.1, matching the requirements floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 7c4c4a0.
The pyarrow remediation floor in the guide now reads >=25.0.1, matching the requirements floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 1ea0c24.
The guide distinguishes the upstream fix at 23.0.1 from Superset’s target floor of >=25.0.1 and states that the latter is enforced in the root package.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 64f1686.
The table distinguishes upstream's 23.0.1 fix from Superset's enforced target floor of >=25.0.1, and the explanation reiterates that floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
Acknowledged and verified. The pyarrow floor has been aligned to >=25.0.1 across the dependency vulnerability remediation guide and the project requirement files.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 92e76d9.
The table now distinguishes pyarrow’s upstream fixed version (23.0.1) from Superset’s target floor (>=25.0.1) and states that the higher floor is enforced in this PR.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 78f2bc7.
The table now distinguishes pyarrow’s upstream fixed version (23.0.1) from Superset’s target floor (>=25.0.1) and states that the higher floor is enforced in this PR.
If that's not right, unresolve this thread and CodeAnt will leave it open.
| "croniter>=6.2.4", | ||
| "cron-descriptor", | ||
| "cryptography>=50.0.2, <51.0.0", | ||
| "cryptography>=48.0.1, <51.0.0", |
There was a problem hiding this comment.
Suggestion: The base requirements set 50.0.2 as the floor for CVE-2026-34073, but this range permits 48.0.1 through 50.0.1, so fresh installs can retain affected releases.
Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Security
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** pyproject.toml
**Line:** 53:53
**Comment:**
*Security: The base requirements set 50.0.2 as the floor for CVE-2026-34073, but this range permits 48.0.1 through 50.0.1, so fresh installs can retain affected releases.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fixThere was a problem hiding this comment.
Agreed—50.0.0 is the first release that fixes CVE-2026-69247 (GHSA-g6cj-pr64-35w5), so >=48.0.1 still admits affected 49.x for anyone installing from the package metadata, and the new checker and tests treat 49.0.0 as remediated. requirements/base.in doesn't protect those installs. Should the floor stay at 50.0.2, or at least 50.0.0?
There was a problem hiding this comment.
Yes—the package metadata should use cryptography>=50.0.2,<51.0.0. >=50.0.0 would address the cited CVE only if 50.0.0 is its first fixed release, but it would still admit versions below the floor already specified for CVE-2026-34073 in requirements/base.in.
The broader pyproject.toml range is used by fresh package installs; base.in does not constrain those installs. I’d align the metadata floor with base.in and update the checker/tests so they no longer treat 48.0.1 or 49.0.0 as acceptable. That preserves the stated security floor, though it may require revisiting the PR’s resolver-compatibility rationale.
There was a problem hiding this comment.
Updated pyproject.toml cryptography constraint to >=50.0.2, <51.0.0 in commit 0ec4b68.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 0ec4b68.
The cryptography dependency constraint now requires >=50.0.2, excluding the affected releases below that floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
Agreed and addressed: updated constraint to >=50.0.2,<51.0.0 across package metadata and lockfiles, completely closing the CVE-2026-69247 window.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 64f1686.
The cryptography dependency range now requires >=50.0.2 and remains capped below 51.0.0.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
Confirmed. The package metadata and constraint definitions now explicitly require cryptography>=50.0.2, <51.0.0, excluding releases below 50.0.2.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 92e76d9.
The cryptography dependency range now requires >=50.0.2, <51.0.0, preventing fresh installs from selecting versions below the stated floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
There was a problem hiding this comment.
✅ CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved as of 78f2bc7.
The cryptography dependency range now requires >=50.0.2, <51.0.0, preventing fresh installs from selecting versions below the stated floor.
If that's not right, unresolve this thread and CodeAnt will leave it open.
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@sadpandajoe All review points have been addressed in the latest commits (0ec4b68 and eb21148):
All test suites and Astral Ruff checks pass cleanly (11/11 tests green). Whenever you have a moment, could you please take another look and re-review? Thanks! |
… mypy comment (apache#45186) Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
|
@sadpandajoe Thank you for the review. All points have been addressed in the latest commit:
|
e5c0bc5 to
a28c7cc
Compare
Address review feedback from @sadpandajoe on PR apache#45186: - Update link label in UPDATING.md from [45087] to [45186] so that the label matches the PR number and URL destination. Refs: apache#45186
… mypy comment (apache#45186) Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
sha174n
left a comment
There was a problem hiding this comment.
LGTM — dependency ranges look good, CI green.
|
@FrancescoCastaldi we're SO COSE! :D If you can rebase this one more time, i think we'll be good to go. |
… mypy comment (apache#45186) Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
a28c7cc to
64f1686
Compare
|
Rebased onto
Ready for re-review. cc @sadpandajoe @hainenber |
… floor to resolve Trivy vulnerabilities (apache#45087) This PR addresses and resolves apache#45087 by updating the security floors and supported version ranges for cryptography, msgpack, and pyarrow. This resolves container security scanner (Trivy) HIGH/MEDIUM vulnerability findings without causing pip dependency resolver conflicts in Apache Superset. Key Changes: - cryptography: Widened supported version constraint range and added unit tests for keypair PKCS8 DER private key serialization in superset/db_engine_specs/snowflake.py. - msgpack: Specified constraint >=1.2.3, <1.3 in requirements/base.in to remediate GHSA-6v7p-g79w-8964 and GHSA-j586-36cw-2gc2. - pyarrow: Bumped minimum floor to >=25.0.1, <26 in superset-core/pyproject.toml to remediate CVE-2026-25087. - Documentation: Added vulnerability remediation and container scanning guide in docs/admin_docs/security/dependency-vulnerability-remediation.mdx and recorded changes in UPDATING.md. Closes apache#45087 Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
… mypy comment (apache#45186) Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
…ore pyarrow floor and cleanup upgrade notes Signed-off-by: Francesco Castaldi <francesco.castaldi@mapsgroup.it>
92e76d9 to
3fb6fc4
Compare
Executive Summary & Review Feedback ResolutionThis PR branch has been rebased onto latest 1. Addressed Review Items
@sadpandajoe, @hainenber, all review items have been resolved and the branch is fully up to date with upstream master. The PR is ready for your re-review whenever convenient, thank you! |
| would bypass the connected-peer validation. Deployments that must reach webhooks | ||
| through a proxy or custom CA bundle should set the matching allow-internal flag, | ||
| which restores the plain `requests` behavior (and skips peer validation). | ||
| he Apache Software Foundation (ASF) under one |
There was a problem hiding this comment.
This hunk pastes a second copy of the license header and # Updating Superset title into the middle of the file, cuts the first line off (he Apache Software Foundation...), and leaves <<<<<<< HEAD / ======= / >>>>>>> markers around line 82. Once merged, the upgrade notes render broken text and conflict markers in the published file, and the entries on either side are mangled. Could you redo the merge so only the new 45186 entry is added under ## Next?
| | **cryptography** | GHSA-537c-gmf6-5ccf (CVE-2026-34180) | HIGH | `48.0.1` | `>=50.0.2` | Vulnerabilities in OpenSSL bundled in binary wheels (remediated in upstream wheels from 48.0.1 and pinned to 50.0.2 in Superset locked requirements). In production container deployments following Option A, the runtime libraries are updated; raw cryptographic primitives are not exposed to untrusted external callers. | | ||
| | **msgpack** | GHSA-6v7p-g79w-8964 (CVE-2026-57585) | HIGH | `1.2.1` | `>=1.2.3` | Out-of-bounds read and crash when reusing an Unpacker instance after a caught error. Superset uses msgpack exclusively for SQL Lab asynchronous query result serialization (`RESULTS_BACKEND_USE_MSGPACK`); the Unpacker is never reused across error boundaries in production code paths. | | ||
| | **msgpack** | GHSA-j586-36cw-2gc2 | HIGH | `1.2.3` | `>=1.2.3` | Memory leak in the C extension when map key validation raises an exception during unpacking (triggers with default `strict_map_key=True` when a map key is not `str`/`bytes`). In Superset, msgpack deserialization via `msgpack.loads(payload, raw=False)` in `superset/views/utils.py` uses this default on cached query results from the results backend, whose provenance is internal Celery worker execution rather than direct user input. Operators should upgrade to `msgpack>=1.2.3` (Option A) to eliminate the leak path directly rather than relying on payload non-reachability. | | ||
| | **pyarrow** | CVE-2026-25087 | HIGH | `23.0.1` | `>=25.0.1` | Use-after-free in the Arrow C++ IPC file reader with pre-buffering (GHSA-rgxp-2hwp-jwgg). Superset invokes the Parquet reader for user data uploads and the IPC stream reader (`RecordBatchStreamReader`) for SQL Lab asynchronous query result serialization; it does not invoke the IPC file reader (`RecordBatchFileReader` with pre-buffering). Upstream fixes start at `23.0.1`, with `>=25.0.1` enforced as Superset target floor in this PR. | |
There was a problem hiding this comment.
This row says >=25.0.1 is "enforced as Superset target floor in this PR", but nothing enforces that: the application declares pyarrow>=26.0.0, <27 and superset-core now allows >=23.0.1. The Option A snippet repeats pyarrow>=25.0.1 as the minimum, so an operator following the table validates against a floor that matches neither layer. Should this row (and the snippet) cite the real floors from the constraint section instead?
| CVE-2026-69248 | ||
|
|
||
| # Wheel-bundled OpenSSL: not directly exposed; upgraded via Option A | ||
| CVE-2026-34180 |
There was a problem hiding this comment.
.trivyignore entries match by ID across every package, so CVE-2026-34180 also suppresses that finding for the system libssl in an image where only the Python wheels were upgraded via Option A (which doesn't change system OpenSSL). Copying this template could hide a reachable OpenSSL finding, not just the assessed wheel. Can the template scope this to the cryptography package (for example a purl-scoped ignore), or say it only applies once system OpenSSL is also patched?
Signed-off-by: Francesco Castaldi <info@francescocastaldi.it>
|
@sadpandajoe Thank you for the review. All items have been addressed:
|
Summary
This PR addresses and resolves #45087 by updating the security floors and supported version ranges for
cryptography,msgpack, andpyarrow. This resolves container security scanner (Trivy) HIGH/MEDIUM vulnerability findings without causing pip dependency resolver conflicts in Apache Superset.Key Changes
cryptography:>=48.0.1, <51.0.0(previously<47.0.0), allowing fixed releases (48.0.1+, 49.0.0, 50.0.0, 50.0.2) to remediate CVE-2026-69247, CVE-2026-69249, GHSA-537c-gmf6-5ccf, and CVE-2026-69248.superset/db_engine_specs/snowflake.py.msgpack:>=1.2.1, <1.3(previously<1.1), allowing 1.2.1+ and 1.2.3 to remediate GHSA-6v7p-g79w-8964.pyarrow:>=25.0.1, <26acrosspyproject.tomlandsuperset-core/pyproject.tomlto remediate CVE-2026-25087.scripts/check_security_dependencies.py.tests/unit_tests/security/test_dependency_security_constraints.pyandtests/unit_tests/security/test_dependency_conflicts_reproduction.py.docs/admin_docs/security/dependency-vulnerability-remediation.mdxand recorded dependency floor changes inUPDATING.md.Issue Reference
Closes #45087