/

CVE-2026-25851

Severity:

CRITICAL RISK

(9.4)

Missing Authentication / Broken Access Control

CVE-2026-25851

Modified

Vulnerability type

Category:

Missing Authentication / Broken Access Control

CWE:

CWE-306

Impact:

Unauthorized Control and Privilege Escalation via Station Impersonation

Severity:

CRITICAL RISK

(9.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The OCPP WebSocket endpoint accepts connections without authenticating the charging station identity, allowing attackers to impersonate chargers using known or guessable station identifiers.

Once connected, an attacker can issue or receive OCPP commands as if they were a legitimate charging station, potentially gaining unauthorized control over charging infrastructure and corrupting backend operational data.

Affected context

This vulnerability arises in OCPP-based electric vehicle charging backends that expose WebSocket endpoints accepting charger connections without enforcing strong authentication or binding identities cryptographically.

It typically manifests where:

  • Charging stations are identified only by IDs passed in the WebSocket/OCPP handshake
  • The backend trusts the claimed station ID without verifying its authenticity
  • Network-level access to the WebSocket endpoint is possible from untrusted clients (e.g., internet-exposed endpoints, shared networks, or poorly segmented infrastructure)

The risk increases where charger identifiers are predictable, discoverable, or leak through logs, documentation, or network traffic.

Exploit preconditions

  • Attack surface: Public or semi-public OCPP WebSocket endpoint used by charging stations to connect to the backend.
  • Required access: Network connectivity to the WebSocket endpoint; no prior authentication is required by design.
  • Attacker knowledge: Ability to know, guess, or discover a valid charging station identifier (e.g., sequential IDs, enumerated names, leaked configs).
  • Trigger point: Initiating a WebSocket connection and OCPP session while claiming the target station's identifier.
  • Why exploitation is possible: The backend accepts the claimed station identity at face value and authorizes OCPP operations without verifying that the caller is the legitimate device associated with that identifier.

Why this happens

The core issue corresponds to CWE-306: Missing Authentication for Critical Function, where a system exposes sensitive operations without verifying the identity of the caller.

In this case, the OCPP WebSocket endpoint treats the presence of a station identifier in the connection or protocol layer as sufficient for trust, effectively conflating identification with authentication.

This design pattern fails to:

  • Bind a logical station ID to a cryptographic credential or shared secret
  • Enforce any proof-of-possession of keys, certificates, or tokens
  • Validate that the entity initiating the session is the physical charger it claims to be

As a result, any network client can impersonate a charger, causing the backend to execute privileged charging-related operations and accept maliciously crafted telemetry and control messages.

Potential impact

  • Unauthorized issuance of OCPP commands, including starting or stopping charging sessions.
  • Manipulation of charging parameters (e.g., power limits, schedules) leading to operational disruption.
  • Injection of falsified charging session data, energy consumption metrics, or state-of-charge information into the backend.
  • Corruption of billing, reporting, and settlement data derived from charger telemetry.
  • Misuse of charging infrastructure for fraud, such as creating phantom sessions or masking real usage.
  • Potential cascading impact on grid management systems if backend data is integrated into energy or load-balancing platforms.
  • Erosion of trust in the charging network due to unreliable or tampered operational data.

General mitigation guidance

Effective mitigation focuses on enforcing strong, device-bound authentication and minimizing implicit trust in identifiers:

  • Introduce mutual authentication between chargers and backend (e.g., TLS client certificates, signed tokens, or hardware-bound keys) so that station IDs are cryptographically bound to credentials.
  • Treat station identifiers as non-trustworthy metadata and require additional proofs of identity during WebSocket/OCPP session establishment.
  • Apply least-privilege authorization policies for charger sessions, constraining what operations are permitted per device and validating that commands align with expected state and configuration.
  • Use secure-by-default network controls: restrict inbound access to OCPP endpoints, segment charging devices from general internet clients, and avoid exposing control endpoints directly where possible.
  • Implement robust input and behavior validation for telemetry and commands, flagging anomalies (e.g., impossible usage patterns or conflicting state reports) for review.

These patterns reduce reliance on unauthenticated identifiers and make impersonation significantly harder, even if IDs are known or guessable.

How teams detect issues like this

Detection efforts can target both design-level weaknesses and runtime anomalies:

  • Design and code review:
  • Identify WebSocket/OCPP connection handlers that accept station IDs without validating client certificates, tokens, or other credentials.
  • Look for authorization logic that uses only station IDs or other unverified identifiers as the basis for trust.
  • Review API gateway or reverse-proxy configurations to ensure they do not terminate authentication requirements prematurely for OCPP endpoints.
  • Static analysis and automated review:
  • Configure rules to flag network entry points (WebSocket handlers, OCPP session factories) that lack calls to authentication/authorization modules.
  • Use architectural scanning tools or security linters to highlight externally reachable endpoints that skip authentication middleware.
  • Operational monitoring:
  • Log and monitor connections where multiple physical locations or IP ranges claim the same station ID.
  • Detect unusual patterns, such as frequent connect/disconnect cycles or simultaneous sessions for a single charger ID.
  • Correlate charger telemetry with physical constraints (time, energy, location) to identify data tampering indicators.

Combining design-time and runtime detection makes it easier to spot both the underlying misconfiguration and active exploitation attempts.

Sources

SourceLink
chargemap.comchargemap.com/en-us/support
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsa-26-057-05.json
cisa.govcisa.gov/news-events/ics-advisories/icsa-26-057-05

Frequently asked

questions

Yes. If the OCPP WebSocket endpoint is reachable from untrusted networks (such as the public internet or shared provider networks), an attacker can exploit this vulnerability remotely by impersonating a charging station.

No traditional credentials are required if the endpoint does not enforce authentication. The main prerequisite is knowledge or successful guessing of a valid station identifier and the ability to reach the WebSocket endpoint over the network.

The most robust approach is to enforce strong, cryptographically-backed authentication for all charging stations, such as mutual TLS with device certificates or signed tokens that bind a station ID to a verified credential, and to ensure all OCPP sessions pass through this authentication step before any commands or telemetry are accepted.

Architect control-plane services under the assumption that identifiers are not proof of identity, mandate authentication at all externally reachable endpoints, use defense-in-depth (network segmentation, rate limiting, anomaly detection), and incorporate authentication and authorization checks as explicit requirements in design reviews, threat models, and CI/CD security gates.

Find out what's already
exploitable in your codebase.