CVE-2024-27135 Overview
CVE-2024-27135 is an improper input validation flaw [CWE-20] in the Apache Pulsar Function Worker. An authenticated user can execute arbitrary Java code on the Function Worker process, escaping the sandboxes designated for user-provided functions. The flaw also affects the Pulsar Broker when deployed with functionsWorkerEnabled=true, expanding the attack surface to combined broker/worker deployments. Affected releases span Apache Pulsar versions 2.4.0 through 2.10.5, 2.11.0 through 2.11.3, 3.0.0 through 3.0.2, 3.1.0 through 3.1.2, and 3.2.0. The vulnerability enables sandbox escape, host compromise, and lateral movement across Pulsar clusters that process untrusted function submissions.
Critical Impact
Authenticated attackers can execute arbitrary Java code outside the Pulsar Function sandbox, leading to full compromise of the Function Worker host and any cluster credentials it holds.
Affected Products
- Apache Pulsar Function Worker 2.4.0 through 2.10.5, 2.11.0 through 2.11.3
- Apache Pulsar Function Worker 3.0.0 through 3.0.2, 3.1.0 through 3.1.2, and 3.2.0
- Apache Pulsar Broker instances configured with functionsWorkerEnabled=true
Discovery Timeline
- 2024-03-12 - CVE-2024-27135 published to NVD
- 2025-02-13 - Last updated in NVD database
Technical Details for CVE-2024-27135
Vulnerability Analysis
Apache Pulsar Functions run user-supplied logic inside isolated sandboxes to separate tenant code from the worker runtime. The Function Worker accepts function definitions, packages, and configuration from authenticated clients over the network. The worker fails to properly validate fields in these submissions before passing them to the Java runtime. As a result, attacker-controlled input reaches code paths that execute Java logic in the worker process itself rather than within the function sandbox.
The scope change in the CVSS vector reflects that exploitation crosses a trust boundary. Code that should run only inside a constrained per-function environment instead runs with the privileges of the Pulsar Function Worker process. On deployments where the broker hosts the function worker through functionsWorkerEnabled=true, the compromise extends to broker-held secrets, ZooKeeper or BookKeeper credentials, and message data in transit.
Root Cause
The defect is a [CWE-20] Improper Input Validation issue. Inputs supplied during function registration or update operations are not sufficiently constrained before being interpreted by privileged Java code outside the sandbox. The intended isolation depends on the worker correctly validating types, paths, and class references in submitted function metadata, and this validation is incomplete in affected versions.
Attack Vector
Exploitation requires network access to the Function Worker API and valid Pulsar credentials with permission to submit or update functions. An attacker authenticates against the cluster, crafts a function submission containing malicious input that bypasses validation, and triggers execution. The malicious Java code then runs in the worker JVM rather than the sandbox, granting filesystem, network, and credential access. No user interaction is required beyond the initial authenticated request. The Apache Pulsar security advisory documents the affected components and references the fix. See the Apache Pulsar CVE-2024-27135 advisory for technical specifics.
Detection Methods for CVE-2024-27135
Indicators of Compromise
- Unexpected child processes spawned by the Pulsar Function Worker JVM, particularly shell interpreters or network utilities.
- Function submissions or updates from accounts that do not normally deploy functions, especially with unusual class names or jar references.
- Outbound network connections from the Function Worker host to attacker-controlled infrastructure not associated with normal cluster traffic.
Detection Strategies
- Audit Pulsar admin API logs for functions create, functions update, and functions restart calls and correlate them with the submitting principal and source IP.
- Monitor the Function Worker JVM for anomalous process creation, class loading from unexpected paths, and reflective calls outside the function sandbox classloader.
- Compare deployed function metadata against an approved inventory to identify unauthorized or malformed submissions.
Monitoring Recommendations
- Forward Pulsar broker and function worker logs to a centralized analytics platform and alert on function lifecycle operations from non-CI/CD identities.
- Enable host-level telemetry on Function Worker nodes to capture process trees, file writes under temporary directories, and outbound connections.
- Track Pulsar version strings reported by brokers and workers to confirm all nodes are on patched releases.
How to Mitigate CVE-2024-27135
Immediate Actions Required
- Upgrade Pulsar Function Worker deployments to a fixed release: 2.10.6, 2.11.4, 3.0.3, 3.1.3, or 3.2.1 or later, matching your current branch.
- Inventory all brokers configured with functionsWorkerEnabled=true and prioritize them, since the broker process inherits the worker's exposure.
- Rotate any credentials, tokens, or TLS keys that were accessible to Function Worker hosts during the exposure window.
Patch Information
The Apache Pulsar project released fixes in versions 2.10.6, 2.11.4, 3.0.3, 3.1.3, and 3.2.1. Refer to the Apache Pulsar security advisory for CVE-2024-27135 and the Apache mailing list announcement for the official fix details and version mapping.
Workarounds
- Restrict function submission privileges to a minimal set of trusted automation accounts using Pulsar's role-based authorization until patching completes.
- Run the Function Worker in standalone mode on isolated hosts rather than co-locating it with brokers, reducing blast radius if exploitation occurs.
- Place the Function Worker admin API behind network controls that only permit access from build pipelines and operator jump hosts.
# Verify Pulsar version on broker/worker nodes
./bin/pulsar version
# Disable in-broker function worker until patched (broker.conf)
functionsWorkerEnabled=false
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


