/

CVE-2026-24731

Severity:

CRITICAL RISK

(9.4)

Missing Authentication in OCPP WebSocket Charging Endpoints

CVE-2026-24731

Modified

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Privilege Escalation and Unauthorized Control of Charging Infrastructure

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

Missing authentication on OCPP WebSocket endpoints allows attackers to impersonate charging stations and interact with the backend as if they were legitimate devices.

By connecting with a known or discovered station identifier, an unauthenticated attacker can issue or receive OCPP commands, potentially leading to unauthorized control of charging infrastructure and manipulation of backend charging data.

Affected context

This vulnerability affects systems that expose OCPP (Open Charge Point Protocol) WebSocket endpoints for charging stations without enforcing strong authentication of the connecting device.

It is most relevant in deployments where:

  • WebSocket endpoints are reachable from untrusted networks (e.g., public internet or shared mobile networks)
  • Charging station identifiers are predictable, discoverable, or reused
  • The backend fully trusts the identity implied by the WebSocket connection and station ID
  • Authorization decisions are based on the claimed station identity rather than validated credentials

Exploit preconditions

  • Attack surface: Public or semi-public OCPP WebSocket endpoints used by charging stations
  • Required access: Network-level ability to reach the WebSocket endpoint (no prior authentication required)
  • Trigger point: Attacker initiates a WebSocket connection and supplies a valid or guessed charging station identifier
  • Why exploitation is possible: The backend accepts the station identifier at face value, does not require device-level authentication or secure enrollment, and lacks robust checks to distinguish legitimate chargers from arbitrary clients

Why this happens

The core issue maps to CWE-306: Missing Authentication for Critical Function.

The backend OCPP implementation exposes critical station operations—such as starting/stopping sessions, updating configuration, and reporting meter values—over WebSockets without enforcing a reliable authentication mechanism for the connecting entity.

Instead of validating that a client is an authorized and enrolled charging station, the system trusts the station identifier alone, which can be guessed, observed, or enumerated.

This design flaw turns a protocol endpoint intended for authenticated devices into an open interface that any network-attached actor can abuse.

Potential impact

  • Unauthorized impersonation of charging stations within the network
  • Remote control of charging operations, including starting or stopping charging sessions
  • Manipulation of configuration parameters or firmware-related commands sent to chargers
  • Corruption or falsification of usage and billing data reported to the backend
  • Disruption of charging services, potentially causing denial of service for legitimate users
  • Lateral escalation within backend systems that trust data and commands originating from chargers

General mitigation guidance

Effective mitigation focuses on introducing strong, device-bound authentication and tightening trust around OCPP endpoints.

Common defensive patterns include:

  • Enforcing mutual authentication between charging stations and backend (e.g., certificate-based device identity or equivalent strong credentials)
  • Binding station identifiers to cryptographically verifiable identities, rather than accepting free-form IDs from clients
  • Applying least-privilege access control so that even authenticated stations can only perform operations appropriate to their role and enrollment state
  • Segmenting network access so that OCPP endpoints are not directly exposed to the broader internet without additional gateway or API security controls
  • Implementing secure device onboarding and lifecycle management, including revocation of compromised device identities

These measures reduce reliance on implicit trust in station identifiers and restrict who can interact with critical charging operations.

How teams detect issues like this

Detection typically combines design-time review, code analysis, and runtime monitoring:

  • Static and code review: Look for WebSocket handlers that accept OCPP connections but lack explicit authentication, device identity validation, or token/certificate checks.
  • Configuration and architecture review: Verify that authentication and TLS termination are correctly enforced at gateways, load balancers, and application servers for OCPP paths.
  • Policy enforcement: Use security policies or API gateways that require authentication on all WebSocket endpoints exposing critical operations.
  • Runtime monitoring: Analyze logs for anomalous station behavior, such as multiple geographically distant IPs using the same station ID, or unexpected bursts of commands from unfamiliar networks.

Automated security scanning and architectural linting can help flag endpoints that bypass standard authentication middleware or policies.

Sources

SourceLink
ev2go.ioev2go.io/
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsa-26-057-04.json
cisa.govcisa.gov/news-events/ics-advisories/icsa-26-057-04

Frequently asked

questions

Yes. If the OCPP WebSocket endpoint is reachable from the internet or other untrusted networks, an attacker can remotely connect and impersonate charging stations without prior access.

The attacker only needs network access to the WebSocket endpoint. No valid credentials are required; knowing or guessing a station identifier is typically sufficient.

Introduce robust device authentication for all OCPP WebSocket connections, ensuring that every station presents a cryptographically verifiable identity bound to its station ID, and enforce authorization checks before accepting or processing commands.

Treat all protocol endpoints that control physical infrastructure or billing data as critical, require authentication and authorization by default, integrate OCPP endpoints behind standardized auth middleware or gateways, and include authentication requirements as explicit items in design reviews and security testing.

Find out what's already
exploitable in your codebase.