CVE-2024-27894: Apache Pulsar Pulsar Functions Worker Allows Unauthorized Vulnerability

HIGH
Advisory Identifier: GHSA-c2x9-vw5h-39vc
CVSS 8.8
CWE-20
Published
Advisory Summary

CVE-2024-27894 is a HIGH (CVSS 8.8) pulsar functions worker allows unauthorized vulnerability (CWE-20: Improper Input Validation) affecting Apache Pulsar libraries in the Maven ecosystem. The issue involves pulsar functions worker allows unauthorized file access and unauthorized http/https proxying. Remediation is available by upgrading affected packages to version 2.10.6, 2.11.4, 3.0.3, 3.1.3, 3.2.1.

CVE-2024-27894 at a Glance

CVE Identifier CVE-2024-27894
GHSA Identifier GHSA-c2x9-vw5h-39vc
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-20: Improper Input Validation
Affected Product Apache Pulsar
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-27894

To remediate this vulnerability, upgrade all affected Apache Pulsar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.pulsar:pulsar-functions-worker fixed: 2.10.6
<dependency>
    <groupId>org.apache.pulsar</groupId>
    <artifactId>pulsar-functions-worker</artifactId>
    <version>2.10.6</version>
</dependency>
org.apache.pulsar:pulsar-functions-worker fixed: 2.11.4
<dependency>
    <groupId>org.apache.pulsar</groupId>
    <artifactId>pulsar-functions-worker</artifactId>
    <version>2.11.4</version>
</dependency>
org.apache.pulsar:pulsar-functions-worker fixed: 3.0.3
<dependency>
    <groupId>org.apache.pulsar</groupId>
    <artifactId>pulsar-functions-worker</artifactId>
    <version>3.0.3</version>
</dependency>
org.apache.pulsar:pulsar-functions-worker fixed: 3.1.3
<dependency>
    <groupId>org.apache.pulsar</groupId>
    <artifactId>pulsar-functions-worker</artifactId>
    <version>3.1.3</version>
</dependency>
org.apache.pulsar:pulsar-functions-worker fixed: 3.2.1
<dependency>
    <groupId>org.apache.pulsar</groupId>
    <artifactId>pulsar-functions-worker</artifactId>
    <version>3.2.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.pulsar

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-27894, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.pulsar

Analyze the terminal output to locate any version of Apache Pulsar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.6), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.pulsar command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Apache Pulsar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The Pulsar Functions Worker includes a capability that permits authenticated users to create functions where the function's implementation is referenced by a URL. The supported URL schemes include "file", "http", and "https". When a function is created using this method, the Functions Worker will retrieve the implementation from the URL provided by the user. However, this feature introduces a vulnerability that can be exploited by an attacker to gain unauthorized access to any file that the Pulsar Functions Worker process has permissions to read. This includes reading the process environment which potentially includes sensitive information, such as secrets. Furthermore, an attacker could leverage this vulnerability to use the Pulsar Functions Worker as a proxy to access the content of remote HTTP and HTTPS endpoint URLs. This could also be used to carry out denial of service attacks. 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. The updated versions of Pulsar Functions Worker will, by default, impose restrictions on the creation of functions using URLs. For users who rely on this functionality, the Function Worker configuration provides two configuration keys: "additionalEnabledConnectorUrlPatterns" and "additionalEnabledFunctionsUrlPatterns". These keys allow users to specify a set of URL patterns that are permitted, enabling the creation of functions using URLs that match the defined patterns. This approach ensures that the feature remains available to those who require it, while limiting the potential for unauthorized access and exploitation.

CVE-2024-27894 Affected Apache Pulsar Versions

5 component(s)
Fixed Versions:
2.10.62.11.43.0.33.1.33.2.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.pulsar:pulsar-functions-worker
Maven
≥ 2.4.0
< 2.10.6
2.10.6
org.apache.pulsar:pulsar-functions-worker
Maven
≥ 2.11.0
< 2.11.4
2.11.4
org.apache.pulsar:pulsar-functions-worker
Maven
≥ 3.0.0
< 3.0.3
3.0.3
org.apache.pulsar:pulsar-functions-worker
Maven
≥ 3.1.0
< 3.1.3
3.1.3
org.apache.pulsar:pulsar-functions-worker
Maven
≥ 3.2.0
< 3.2.1
3.2.1

References

Frequently Asked Questions

What is CVE-2024-27894?
CVE-2024-27894 is a security vulnerability in Apache Pulsar involving Pulsar Functions Worker Allows Unauthorized File Access and Unauthorized HTTP/HTTPS Proxying under CWE-20: Improper Input Validation.
Which Apache Pulsar versions are affected?
Affected versions include releases prior to 2.10.6, 2.11.4, 3.0.3, 3.1.3, 3.2.1 across affected packages: org.apache.pulsar:pulsar-functions-worker.
What version fixes CVE-2024-27894?
Upgrading to 2.10.6, 2.11.4, 3.0.3, 3.1.3, 3.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pulsar-functions-worker affected?
Yes, org.apache.pulsar:pulsar-functions-worker is affected in releases prior to 2.10.6, 2.11.4, 3.0.3, 3.1.3, 3.2.1. Upgrade your dependency to 2.10.6, 2.11.4, 3.0.3, 3.1.3, 3.2.1 or later.
What is the CVSS score of CVE-2024-27894?
CVE-2024-27894 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-27894?
CVE-2024-27894 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2024-27894?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.pulsar'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c2x9-vw5h-39vc",
  "modified" : "2025-01-21T18:19:26Z",
  "published" : "2024-03-12T21:30:59Z",
  "aliases" : [ "CVE-2024-27894" ],
  "summary" : "Apache Pulsar: Pulsar Functions Worker Allows Unauthorized File Access and Unauthorized HTTP/HTTPS Proxying",
  "details" : "The Pulsar Functions Worker includes a capability that permits authenticated users to create functions where the function's implementation is referenced by a URL. The supported URL schemes include \"file\", \"http\", and \"https\". When a function is created using this method, the Functions Worker will retrieve the implementation from the URL provided by the user. However, this feature introduces a vulnerability that can be exploited by an attacker to gain unauthorized access to any file that the Pulsar Functions Worker process has permissions to read. This includes reading the process environment which potentially includes sensitive information, such as secrets. Furthermore, an attacker could leverage this vulnerability to use the Pulsar Functions Worker as a proxy to access the content of remote HTTP and HTTPS endpoint URLs. This could also be used to carry out denial of service attacks.\nThis vulnerability also applies to the Pulsar Broker when it is configured with \"functionsWorkerEnabled=true\".\n\nThis 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. \n\n2.10 Pulsar Function Worker users should upgrade to at least 2.10.6.\n2.11 Pulsar Function Worker users should upgrade to at least 2.11.4.\n3.0 Pulsar Function Worker users should upgrade to at least 3.0.3.\n3.1 Pulsar Function Worker users should upgrade to at least 3.1.3.\n3.2 Pulsar Function Worker users should upgrade to at least 3.2.1.\n\nUsers operating versions prior to those listed above should upgrade to the aforementioned patched versions or newer versions.\n\nThe updated versions of Pulsar Functions Worker will, by default, impose restrictions on the creation of functions using URLs. For users who rely on this functionality, the Function Worker configuration provides two configuration keys: \"additionalEnabledConnectorUrlPatterns\" and \"additionalEnabledFunctionsUrlPatterns\". These keys allow users to specify a set of URL patterns that are permitted, enabling the creation of functions using URLs that match the defined patterns. This approach ensures that the feature remains available to those who require it, while limiting the potential for unauthorized access and exploitation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pulsar:pulsar-functions-worker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pulsar:pulsar-functions-worker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pulsar:pulsar-functions-worker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pulsar:pulsar-functions-worker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.pulsar:pulsar-functions-worker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0"
      }, {
        "fixed" : "3.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27894"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/pulsar"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/45cqhgqg8d19ongjw18ypcss8vwh206p"
  }, {
    "type" : "WEB",
    "url" : "https://pulsar.apache.org/security/CVE-2024-27894"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/03/12/11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-14T21:40:26Z",
    "nvd_published_at" : "2024-03-12T19:15:47Z"
  }
}