Patchfirst
CVE-2024-27317 High · 8.4 EPSS 56.9%

Apache Pulsar: Pulsar Functions Worker's Archive Extraction Vulnerability Allows Unauthorized File Modification

Fix:upgrade pulsar-functions-worker to 3.2.1 or later Details ↓

Apache Software Foundation · Apache Pulsar

Summary

A directory traversal flaw in the Functions Worker component of Apache Pulsar (also present in the Pulsar Broker when functionsWorkerEnabled=true) lets crafted jar or nar archives escape the extraction directory because filenames inside the zip are not properly validated. An attacker who has valid credentials and can upload functions over the network, with the attack being hard to reproduce reliably, can create or modify files outside the designated directory and potentially influence system behaviour.

Official description · CVE.org

In Pulsar Functions Worker, authenticated users can upload functions in jar or nar files. These files, essentially zip files, are extracted by the Functions Worker. However, if a malicious file is uploaded, it could exploit a directory traversal vulnerability. This occurs when the filenames in the zip files, which aren't properly validated, contain special elements like "..", altering the directory path. This could allow an attacker to create or modify files outside of the designated extraction directory, potentially influencing system behavior. This vulnerability also applies to the Pulsar Broker when it is configured with "functionsWorkerEnabled=true". This issue affects Apache Pulsar versions from 2.4.0 to 2.10.5, from 2.11.0 to 2.11.3, from 3.0.0 to 3.0.2, from 3.1.0 to 3.1.2, and 3.2.0. 2.10 Pulsar Function Worker users should upgrade to at least 2.10.6. 2.11 Pulsar Function Worker users should upgrade to at least 2.11.4. 3.0 Pulsar Function Worker users should upgrade to at least 3.0.3. 3.1 Pulsar Function Worker users should upgrade to at least 3.1.3. 3.2 Pulsar Function Worker users should upgrade to at least 3.2.1. Users operating versions prior to those listed above should upgrade to the aforementioned patched versions or newer versions.

Breakdown
26.4 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 12 Mar 2024. No public exploit code or confirmed exploitation is recorded.

4 fixes in pulsar-functions-worker over 8 months. The latest fix listed for pulsar-functions-worker is 3.2.1.

Fixes in pulsar-functions-workerMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.11.1CVE-2023-3757912 Jul 2023
  2. 3.2.1CVE-2024-2713512 Mar 2024
  3. 3.2.1CVE-2024-2731712 Mar 2024
  4. 3.2.1CVE-2024-2789412 Mar 2024Latest listed

Affected versions and fixes

as published in the CVE record

Apache Software Foundation Apache Pulsar

Affected: >= 2.4.0, < 2.10.6 · >= 2.11.0, < 2.11.4 · >= 3.0.0, < 3.0.3 · >= 3.1.0, < 3.1.3 · >= 3.2.0, < 3.2.1

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.apache.pulsar:pulsar-functions-worker.

Mavenorg.apache.pulsar:pulsar-functions-workerGHSA-jg2g-4rjg-cmqh

Upgrade to 3.2.1 or later

Set the version to 3.2.1 or later in your pom.xml or build.gradle.

The first fix for CVE-2024-27317. No other CVE tracked by Patchfirst affects this package.

Affected versions, by release line

If you runUpgrade to
3.2.0 up to 3.2.13.2.1
3.1.0 up to 3.1.33.1.3
3.0.0 up to 3.0.33.0.3
2.11.0 up to 2.11.42.11.4
2.4.0 up to 2.10.62.10.6

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 1 community threat pulse (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close