/

CVE-2026-27767

Severity:

CRITICAL RISK

(9.4)

Missing Authentication in Charging Backend

CVE-2026-27767

Modified

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthorized Remote Control and Data Manipulation

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

A missing authentication control on OCPP WebSocket endpoints allows attackers to impersonate charging stations by connecting with a known or guessable charger identifier.

Once connected, an attacker can issue or receive OCPP commands as if they were a legitimate station, which can result in unauthorized control over charging operations, data manipulation, and privilege escalation within the charging network.

Affected context

This vulnerability appears in OCPP-based charging infrastructure where backend WebSocket endpoints accept connections without enforcing strong authentication or binding identities to cryptographic credentials.

It is most relevant in deployments where:

  • Charging station identifiers (IDs) are static, predictable, or discoverable
  • WebSocket endpoints are reachable from untrusted networks (e.g., the public internet or shared networks)
  • The backend implicitly trusts that any client using a valid charger ID is the legitimate physical station

In such environments, backend systems may treat all messages received over the unauthenticated WebSocket as authoritative, enabling impersonation and unauthorized command execution.

Exploit preconditions

  • Attack surface: Public or semi-public OCPP WebSocket endpoint exposed by the charging backend.
  • Required access: Network-level ability to reach the WebSocket server (e.g., internet connectivity or access to the relevant network segment).
  • Identity knowledge: Knowledge or discovery of a valid charging station identifier, which may be obtained via documentation, enumeration, observation of traffic, physical access to a station, or predictable ID schemes.
  • Trigger point: Establishing a WebSocket connection to the OCPP endpoint while claiming the target station's identifier and then sending or receiving OCPP messages.
  • Why exploitation is possible: The backend does not require authentication (such as certificates, tokens, or cryptographic proof of identity) before accepting a station ID as valid, so it cannot distinguish between legitimate chargers and arbitrary clients using the same ID.

Why this happens

The underlying issue is the absence of authentication and identity verification for entities connecting to the OCPP WebSocket endpoint.

This maps to CWE-306: Missing Authentication for Critical Function, where a system exposes functionality that should require authentication but instead trusts unauthenticated input.

In this case, the backend implicitly treats possession or presentation of a charger identifier as sufficient proof of identity, without:

  • Binding the charger ID to a cryptographic identity
  • Requiring client-side credentials (e.g., mutual TLS, signed tokens)
  • Implementing per-connection authorization checks

As a result, any network client that can reach the WebSocket endpoint and provide a plausible charger ID is able to access critical operational functions typically reserved for actual charging stations.

Potential impact

  • Unauthorized issuance of OCPP commands (e.g., start/stop transactions) as a specific charging station
  • Remote manipulation or interruption of charging sessions, potentially affecting availability of charging services
  • Corruption or falsification of metering and session data reported to the backend
  • Privilege escalation within the charging network by impersonating high-privilege or central stations
  • Misleading operational dashboards and billing systems through falsified charge data
  • Potential staging of broader attacks against the backend ecosystem based on trusted but spoofed station data

General mitigation guidance

Effective mitigation centers on treating charging station identity as a security boundary and enforcing strong authentication at the WebSocket layer.

Common defensive patterns include:

  • Mutual authentication: Use mutual TLS (mTLS) or equivalent mechanisms so each station presents a unique cryptographic credential bound to its identifier.
  • Token-based access control: Require time-limited, signed tokens or API keys tied to a charger's identity that are validated on every connection.
  • Per-connection authorization: Verify that the claimed station ID is authorized for the presented credential before accepting OCPP messages.
  • Non-predictable identifiers: Avoid sequential or easily guessable station identifiers; incorporate randomness or opaque IDs to reduce trivial enumeration.
  • Network segmentation: Place OCPP endpoints behind controlled network boundaries (e.g., VPNs, private APNs) so only managed devices can initiate connections.
  • Least privilege in backend logic: Limit what each station can affect in the backend and avoid trusting station-supplied data for critical decisions without cross-checks.

These patterns focus on strengthening identity, reducing implicit trust in simple identifiers, and ensuring that operational commands originate from authenticated entities.

How teams detect issues like this

Organizations can identify and monitor for this class of issue using a combination of design review, code inspection, and runtime monitoring:

  • Architectural and code review:
  • Examine WebSocket connection handlers to confirm that authentication and authorization checks occur before binding a session to a station ID.
  • Review OCPP server frameworks and configuration to ensure mutual TLS or token-based authentication is required.
  • Look for logic that maps a client to a charger solely based on a parameter (e.g., URL path, query string, JSON field) without credential verification.
  • Static analysis and policy checks:
  • Apply static analysis rules or custom linters to flag WebSocket endpoints that lack calls to authentication middleware or identity checks.
  • Enforce security policies that require explicit authentication configuration for any externally exposed WebSocket endpoint.
  • Runtime monitoring and logging:
  • Log station identifiers alongside IP addresses, certificate subjects, or tokens and alert on anomalies such as:
  • Multiple distinct client sources claiming the same station ID
  • Connections presenting no credentials for critical endpoints
  • Use anomaly detection tools to identify suspicious patterns of station impersonation or unexpected command flows.

Automated application security testing and SAST/DAST tools can support these efforts by highlighting missing authentication paths and verifying that authentication is enforced for critical backend interfaces.

Sources

SourceLink
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsa-26-057-06.json
swtchenergy.comswtchenergy.com/contact/
cisa.govcisa.gov/news-events/ics-advisories/icsa-26-057-06

Frequently asked

questions

Yes. If the OCPP WebSocket endpoint is reachable from the internet or another untrusted network segment, an attacker can exploit the issue remotely by connecting and impersonating a station.

The attacker needs network access to the OCPP WebSocket endpoint and knowledge or discovery of a valid charging station identifier. No prior authentication is required under the vulnerable configuration.

The safest pattern is to require strong, cryptographically backed authentication for every station connection (such as mutual TLS or signed tokens), and to bind each authenticated identity to a specific station ID before accepting or processing OCPP commands.

Treat backend communication endpoints as security-critical interfaces: mandate authentication and authorization at the design phase, enforce security requirements through code review and automated checks, avoid trusting simple identifiers as proof of identity, and ensure that all externally reachable WebSocket and API endpoints require validated credentials for access.

Find out what's already
exploitable in your codebase.