# CVE-2026-40557: Apache Storm Prometheus Reporter vulnerable to Improper Certificate Validation via Global SSL Context Downgrade

> Enabling TLS skip for Prometheus reporter globally disables certificate validation, allowing man-in-the-middle attacks on all cluster communications.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Apr 2026
- **Updated:** 30 Apr 2026
- **Also known as:** GHSA-82fm-wpc2-5pmp

## What is CVE-2026-40557?

CVE-2026-40557 is a medium-severity vulnerability in Apache Storm Prometheus Reporter, published on 27 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Improper Certificate Validation via Global SSL Context Downgrade in Apache Storm Prometheus Reporter

Versions Affected: from 2.6.3 to 2.8.6

Description: 

In production deployments where an administrator enables storm.daemon.metrics.reporter.plugin.prometheus.skip_tls_validation (by default it is disabled) intending to affect only the Prometheus reporter, the undocumented global side effect creates an attack surface across every TLS-protected communication channel in the Storm daemon.

The PrometheusPreparableReporter class implements an INSECURE_TRUST_MANAGER that accepts all SSL certificates without validation, with empty checkClientTrusted and checkServerTrusted methods. Most critically, when the storm.daemon.metrics.reporter.plugin.prometheus.skip_tls_validation configuration option is enabled (default = disabled) for HTTPS Prometheus PushGateway connections, the INSECURE_CONNECTION_FACTORY calls SSLContext.setDefault(sslContext), which globally replaces the JVM's default SSL context rather than applying the insecure context only to the Prometheus connection. This payload flows through storm.yaml configuration → PrometheusPreparableReporter.prepare() → INSECURE_CONNECTION_FACTORY → SSLContext.setDefault(), resulting in a JVM-wide TLS security downgrade. All subsequent HTTPS connections in the process - including ZooKeeper, Thrift, Netty, and UI connections - silently trust all certificates, including self-signed, expired, and attacker-generated ones, enabling man-in-the-middle interception of cluster state, topology submissions, tuple data, and administrative credentials.

Mitigation: 2.x users should upgrade to 2.8.7 if the Prometheus Metrics Reporter is used. Prometheus Metrics Reporter Users who cannot upgrade immediately should remove the storm.daemon.metrics.reporter.plugin.prometheus.skip_tls_validation: true setting from their storm.yaml configuration and instead configure a proper truststore containing the PushGateway's certificate.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2026-40557?

2 open source packages ship an affected version, including org.apache.storm:storm-metrics-prometheus. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.storm:storm-metrics-prometheus` | Maven | From 2.6.3 | 2.8.7 |
| `org.apache.storm:storm-metrics-prometheus` | Maven | From 2.6.3 | 2.8.7 |

Products: Apache Storm Prometheus Reporter.

## How do I fix CVE-2026-40557?

Upgrade org.apache.storm:storm-metrics-prometheus to 2.8.7 or later.

## Is CVE-2026-40557 being exploited?

There is no known exploitation of CVE-2026-40557 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40557 and fix it if it is affected.

What it is: CVE-2026-40557 is a medium-severity vulnerability in Apache Storm Prometheus Reporter, published on 27 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40557 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.storm:storm-metrics-prometheus (Maven): affected from 2.6.3; fixed in 2.8.7
- org.apache.storm:storm-metrics-prometheus (Maven): affected from 2.6.3; fixed in 2.8.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40557/ (Markdown: https://insights.sbomify.com/CVE-2026-40557/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40557
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40557
- OSV: https://osv.dev/vulnerability/CVE-2026-40557

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40557/
Summaries are generated and may contain mistakes; the official description above is the record.
