-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][sec] Added exclusions for vulnerable transitive dependencies (Avro, Tomcat-embed-core, Mina-core, Derby) to remediate CVEs #24946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…vro, Tomcat-embed-core, Mina-core, Derby) to remediate CVEs
|
Please run Pulsar CI in your fork as the first step to ensure that tests pass with these changes. You can find instructions for doing this in the "Personal CI" documentation. |
|
Hi @lhotari, I’ve already run the Personal CI workflows in my fork, and all checks have passed successfully with a few skips. |
In the PR description template, the "PR in forked repository:" is for adding the link to your PR so that the reviewer can find the workflow run. |
| <groupId>org.apache.mina</groupId> | ||
| <artifactId>mina-core</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing mina-core would most likely break the Flume connector. A better approach might be to remove the connector completely since we don't have integration tests to validate that it would really work when using a real network connection.
The current Flume connector tests use org.apache.flume.channel.MemoryChannel and there are not end-to-end integration tests that would use a real Flume instance running in a container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of excluding mina-core, would it be acceptable to override mina-core to the latest fixed version (2.2.4) in dependencyManagement?
This version includes the fix for CVE-2024-52046, so it should allow us to remediate the vulnerability without breaking the Flume connector.
Please let me know if this approach works for you. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Flume connector works with a newer version, it's fine. However we don't really know if it works since tests are missing.
| <exclusion> | ||
| <groupId>org.apache.avro</groupId> | ||
| <artifactId>avro</artifactId> | ||
| </exclusion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this problem be resolved by upgrading hbase.version to 2.6.3-hadoop3 and hadoop3.version to 3.4.1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading the hbase and hadoop3 versions to the latest didn’t eliminate the Avro CVE in Pulsar, but I can update these versions along with the avro exclusion from hbase client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work. However this current PR is problematic since it combines changes for 2 separate connectors in a single PR. It would be better to close this current PR and open a separate PR to upgrade hadoop3.version alone (since it touches also tiered storage component), a separate PR for hbase.version + the Avro exclusion and a separate PR to address the Flume connector. The reason to keep things separately is that it's easier to make decisions whether to include a change in maintenance versions or not.
|
@lhotari Thank you for reviewing my PR. I’ll review the suggested changes and push the updates shortly. Apologies for not including the PR link earlier. |
|
Please close this PR and create separate PRs as mentioned in #24946 (comment) |

Motivation
This PR addresses multiple CVEs detected in transitive dependencies used in the Pulsar IO modules flume and hbase.
The affected libraries are Apache Tomcat Embed Core, Apache MINA, Apache Derby, and Apache Avro, which were introducing vulnerabilities through indirect dependencies.
Vulnerabilities remediated include:
Apache Tomcat Embed Core
Apache MINA
Apache Derby
Apache Avro
Modifications
Added exclusions for vulnerable transitive dependencies in:
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: