Skip to content

Conversation

@guptas6est
Copy link
Contributor

@guptas6est guptas6est commented Nov 4, 2025

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

  • CVE-2024-47561 – Schema Parsing May Trigger Remote Code Execution (RCE)
  • CVE-2023-39410 – Memory Consumption Issue when Deserializing Untrusted Data

Modifications

Added exclusions for vulnerable transitive dependencies in:

  • pulsar-io/flume/pom.xml → Excluded tomcat-embed-core, mina-core, and derby
  • pulsar-io/hbase/pom.xml → Excluded avro

Verifying this change

  • Make sure that the change passes the CI checks.

(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:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

…vro, Tomcat-embed-core, Mina-core, Derby) to remediate CVEs
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 4, 2025
@lhotari
Copy link
Member

lhotari commented Nov 4, 2025

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.

@guptas6est
Copy link
Contributor Author

Hi @lhotari, I’ve already run the Personal CI workflows in my fork, and all checks have passed successfully with a few skips.
Here’s a screenshot for your reference:
image

@lhotari
Copy link
Member

lhotari commented Nov 4, 2025

Hi @lhotari, I’ve already run the Personal CI workflows in my fork, and all checks have passed successfully with a few skips.
Here’s a screenshot for your reference:

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.

@lhotari lhotari added this to the 4.2.0 milestone Nov 4, 2025
Comment on lines +69 to +70
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
Copy link
Member

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.

Copy link
Contributor Author

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!

Copy link
Member

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.

Comment on lines +80 to +83
<exclusion>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</exclusion>
Copy link
Member

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 ?

Copy link
Contributor Author

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.

Copy link
Member

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.

@guptas6est
Copy link
Contributor Author

@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.

@lhotari
Copy link
Member

lhotari commented Nov 5, 2025

Please close this PR and create separate PRs as mentioned in #24946 (comment)

@guptas6est guptas6est closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants