Two operators at a control-room desk with a row of monitors, a laptop and keyboards

OT/ICS security

UDS (ISO 14229) security: the protocol that can reflash an ECU, and what guards it

Last updated:

UDS (Unified Diagnostic Services, standardized as ISO 14229) is the protocol a diagnostic tester — a dealer scan tool, a factory flash station, or an aftermarket device plugged into a diagnostic port — uses to read trouble codes, read and write ECU memory and configuration, and reprogram an ECU's firmware, almost always carried over CAN via the ISO 15765-2 transport. It matters for security precisely because UDS is not a passive, read-only channel: services 0x34/0x36/0x37 exist specifically to write new firmware into an ECU, and service 0x27 (SecurityAccess) is the seed-key gate meant to keep that reprogramming capability restricted to an authorized tester. ISO leaves the actual seed-to-key algorithm up to each manufacturer, and real-world implementations — most notably the one Miller and Valasek reverse engineered out of Fiat Chrysler's dealer tool during their 2015 Jeep Cherokee research — have repeatedly turned out to be weak, short, or predictable. Anyone who can electrically reach the bus an ECU listens on inherits the question of whether that gate actually holds, or whether it is reprogramming access by another name.

Key takeaways

  • UDS is the application layer of vehicle diagnostics, defined in ISO 14229-1.
  • Five service groups decide who can change an ECU.
  • SecurityAccess fails in practice because ISO 14229 leaves the seed-to-key algorithm to each manufacturer.
  • Authentication (0x29) replaces a shared secret with a per-tester identity.

What is UDS, and where does it sit in a vehicle's network stack?

UDS is the application layer of vehicle diagnostics, defined in ISO 14229-1. The 2020 third edition "specifies data link independent requirements of diagnostic services, which allow a diagnostic tester (client) to control diagnostic functions in an on-vehicle electronic control unit (ECU, server)". The fourth edition, ISO 14229-1:2026 (June 2026), replaced it; its foreword says it incorporates Amendment 1:2022 and lists only "corrections related to the service 'responseOnEvent'" as main changes, so the security services below are unchanged.

The same service set runs over CAN via ISO 15765-2 (DoCAN), over Ethernet via DoIP (ISO 13400), and over LIN or FlexRay. "UDS over CAN" means ISO 14229 services inside ISO 15765-2 framing: single, first, consecutive and flow-control frames that carry a payload larger than one classic CAN frame (8 bytes). UDS descends from ISO 14230 (KWP2000), and the two are sometimes confused, which matters for the Jeep research below.

What do the diagnostic services that matter for security actually do?

Five service groups decide who can change an ECU. AUTOSAR's Diagnostic Communication Manager specification (R24-11), the module that implements UDS on most AUTOSAR Classic ECUs, documents them down to negative-response codes (NRCs):

Service (SID) Name What it does
0x10 DiagnosticSessionControl Switches between default, programming and extended sessions. A service not allowed in the active session gets NRC 0x7F ("serviceNotSupportedInActiveSession").
0x27 SecurityAccess Seed-key challenge-response, meant "to provide a possibility to access data and/or diagnostic services, which have restricted access for security, emissions, or safety reasons". The ECU's GetSeed function returns a seed, the tester returns a key, CompareKey checks it, and only then does the security level rise.
0x29 Authentication Certificate-based (APCE) or challenge-response (ACR) authentication that sets a role per connection; added in ISO 14229-1:2020.
0x34 / 0x36 / 0x37 RequestDownload / TransferData / RequestTransferExit Negotiate a transfer (address, size, block size), send firmware blocks, close the transfer: the reflash sequence.
0x22 / 0x2E ReadDataByIdentifier / WriteDataByIdentifier Read or write records such as VIN, calibration and configuration by a 2-byte identifier; sensitive identifiers can require a security level.

Around SecurityAccess, the Dcm specification defines an attempt counter and delay timer with NRC 0x24 (requestSequenceError, key without a seed), 0x35 (invalidKey), 0x36 (exceededNumberOfAttempts) and 0x37 (requiredTimeDelayNotExpired). These slow brute force, but only help if the key derivation behind them is strong.

What's actually wrong with SecurityAccess in practice?

SecurityAccess fails in practice because ISO 14229 leaves the seed-to-key algorithm to each manufacturer. The standard fixes the message exchange, not the algorithm or key material, and the documented results are weak:

  • Miller and Valasek (2015) decrypted the unlock files of Fiat Chrysler's dealer-only wiTECH software and found the algorithms "involve some secrets and simple bitwise manipulations, as these techniques seem to be ubiquitous within the automotive industry" (paper).
  • Koscher et al. (2010), as summarized in the 2024 Colorado State NDSS paper, found "commonly used 8 or 16-bit seed-key pairs are susceptible to brute-force attacks"; the same paper cites Maag, Reding and Howell (2017) for "a linear mapping in seed-key pairs" in heavy vehicles and Kulandaivel (2021) for seeds that "can be influenced by ECU uptime".
  • A Synack test from September 2026, run "against a simulator, not a live vehicle", had an AI agent find that the key was "the seed's bitwise complement (key = seed XOR 0xFF)" (write-up).

None of this is a defect in ISO 14229's text. It follows from delegating algorithm strength to implementers, many of whom chose short, shared or guessable schemes.

What does Authentication (0x29) change?

Authentication (0x29) replaces a shared secret with a per-tester identity. The ISO 14229-1:2020 foreword lists as the first main change: "new diagnostic service for Authentication has been introduced to address cyber security topics", next to a new "Security sub-layer definition"; its contents show two modes, Authentication with PKI Certificate Exchange (APCE) and Authentication with Challenge-Response (ACR).

The AUTOSAR Dcm specification shows how this works in an ECU. 0x29 "is used to change the authentication state of a diagnostic connection and to provide the access rights"; "depending on the reached role and provided white list a dynamic set of diagnostic services is available". Each connection is either deauthenticated or authenticated, client certificates are checked through the key manager (KeyM_VerifyCertificate), and an idle connection falls back to the deauthenticated role. Legislated OBD services are excluded from the checks and stay available.

The practical gain: a leaked dealer tool no longer unlocks every vehicle, because access hangs on a revocable certificate and a role. CISA's advisory on ZF RSSPlus (below) recommends exactly this: "Moving away from security access and implementing the latest security feature authenticate (0x29)".

Which CVEs and advisories involve UDS?

Published UDS CVEs fall into weak seed-key gates, exposed diagnostic access and parser bugs in UDS stacks:

CVE Product Issue Source
CVE-2017-14937 Airbag control units of unnamed passenger vehicles from 2014 "only 256 possible key pairs, and authentication attempts have no rate limit"; a crafted UDS message can fire the pyrotechnic charges NVD
CVE-2023-28896 Volkswagen Group MIB3 infotainment (found on a 2022 Škoda Superb III) Access to critical UDS services sent on CAN "in a form that can be easily decoded" ASRG advisory
CVE-2024-12054 ZF RSSPlus 2M trailer roll-stability ECU (build dates 01/08 through 01/23) "deterministic RSSPlus SecurityAccess service seeds"; CISA advisory ICSA-25-021-03, January 2025 CISA CSAF record
CVE-2026-54413 driftregion iso14229, an open-source UDS library, through 0.9.0 Integer underflow and out-of-bounds read in the 0x27 handler from a single-byte request NVD

The ZF advisory pairs the 0x29 recommendation with "random numbers ... generated from a cryptographically secure hardware true random number generator", the fix for predictable seeds.

What does real, independently verifiable research show about UDS in an actual vehicle attack?

Two papers are often conflated and show different things.

Miller and Valasek, 2015 Jeep Cherokee. After gaining code execution on the Uconnect head unit, the researchers reflashed the Renesas V850 chip that bridges it to CAN over an internal SPI protocol that "looks like ISO 14230 commands" (KWP2000, not ISO 14229), with bytes for startDiagnosticSession (10 85), requestDownload (34 ...) and requestTransferExit (37). The paper notes "no cryptographic signatures are used to verify the firmware is legitimate". For steering and braking they sent real diagnostic session requests on CAN (for example 02 10 02 to the park-assist module), but they state: "we never really needed the security access keys to perform our attacks. The only thing the SecurityAccess algorithms were used for was re-flashing ECUs, which we didn't explore."

Chatterjee, Green and Daily, NDSS VehicleSec 2024. On bench ECUs and a 2018 Freightliner Cascadia cab, they showed a ReadDataByIdentifier overload, a Session Denial attack that exploits the ISO 14229-1 rule that "there shall always be exactly one diagnostic session active in an ECU", and a Diagnostics Jam that alternates ISO-TP "Wait" and "Clear to Send" flow control. The truck's gateway blocked J1939 injection but "consistently permitted almost every diagnostic message, including those related to 'Read Data by ID', 'Diagnostic Session Control', and 'ISO-TP'".

What do UN R155, R156 and NHTSA expect around diagnostics?

UN R155 makes diagnostic access a named threat for type approval. Annex 5 of UN Regulation No 155 lists "11.3 Malicious diagnostic messages", mitigated by M10 ("The vehicle shall verify the authenticity and integrity of messages it receives"), and "18.3 Diagnostic access (e.g. dongles in OBD port) used to facilitate an attack", mitigated by M22 ("Security controls shall be applied to external interfaces"); update threats map to M16, "Secure software update procedures shall be employed". In the EU, Regulation (EU) 2019/2144 made R155 mandatory for new types from 6 July 2022 and for all new registrations from 7 July 2024.

UN Regulation No 156 covers the reflash path: paragraph 7.2.1.1 requires that "the authenticity and integrity of software updates shall be protected", and 7.2.1.2.2 that each RXSWIN be "easily readable ... at least by the standard interface (OBD port)", in practice a UDS read. The EU added R156 to type approval through Delegated Regulation (EU) 2022/2236. The ISO/SAE 21434 guide and the UN R155/R156 guide cover the management-system side.

In the US, NHTSA's January 2021 notice proposed "[T.7] The use of global symmetric keys and ad-hoc cryptographic techniques for diagnostic access should be minimized" and "[T.8]" authenticated, access-controlled tool access to "diagnostic operations and reprogramming"; the September 2022 final best practices kept both and defined "global symmetric keys". They are voluntary.

How should an ECU maker or integrator harden diagnostic access?

  1. Move privileged services behind 0x29Use APCE with per-tester certificates and roles; keep 0x27 only for legacy, with per-ECU keys rather than a fleet-wide secret.
  2. Generate seeds from a hardware true random number generator, and never reuse a seed after reset.
  3. Enforce attempt limits and delays(NRC 0x36/0x37) and keep them across power cycles.
  4. Filter diagnostics at the gateway by session, source address and vehicle state(for example, programming session only when stationary with a workshop tool authenticated); test that it blocks what the Freightliner gateway passed.
  5. Fuzz the UDS stack and the ISO-TP layer, including single-byte and wrong-length requests, the class of bug behind CVE-2026-54413.

What does a hardening review of one ECU look like?

The following is a synthetic, labelled example, not a real product: a body control module with a third-party UDS stack.

Finding Evidence Fix
0x27 level 0x11 unlocks programming; key = seed rotated with a fleet-wide 32-bit constant Ten seed-key pairs captured from a dealer tool Move programming to 0x29 APCE role "workshop"; per-ECU keys for the legacy level
Seeds repeat after each reset Same seed on first request after five power cycles Hardware RNG seed source
Attempt counter resets on power cycle Unlimited guesses with ignition cycling Persist counter and delay in non-volatile memory
Gateway forwards 0x10 0x02 from the OBD port while driving Bench trace at simulated 50 km/h Gateway rule: programming session only at standstill
UDS library version within a published CVE range SBOM entry for the stack Upgrade and re-run the fuzz suite

Common pitfalls in reviews like this: treating 0x29 as done because the service exists while every role still maps to "all services"; leaving development keys such as 0x0000 or 0xFFFF active in production, a pattern the Synack write-up lists; and testing only valid request sequences.

Where does this connect to firmware security work?

Several of these findings live in the ECU binary rather than in the protocol text: which UDS library and version it ships, and whether that version falls in a published CVE range. SoftWSP extracts a software bill of materials from a firmware image as CycloneDX 1.6 JSON, matches the components against NVD, the CISA KEV catalog, FIRST EPSS scores and CISA CSAF ICS advisories, and AI drafts a report in which each finding cites its record; an engineer reviews every finding before delivery. It does not test SecurityAccess algorithms or gateway rules on a vehicle. See device and firmware security services for what the report covers, and the OTA update security guide for the update side.

Put this guide to work

Frequently asked questions

What is UDS, and why does it matter for vehicle security?

UDS (Unified Diagnostic Services) is ISO 14229, the standardized application-layer protocol a diagnostic tester (a dealer scan tool, for example) uses to talk to an on-vehicle ECU over a serial data link — reading diagnostic trouble codes, reading and writing memory or configuration data, and reprogramming (reflashing) the ECU's firmware. ISO's own abstract for the 2020 edition states the standard 'specifies data link independent requirements of diagnostic services, which allow a diagnostic tester (client) to control diagnostic functions in an on-vehicle electronic control unit (ECU, server) such as an electronic fuel injection, automatic gearbox, anti-lock braking system, etc.' It matters for security because UDS is not a passive read-only channel: specific services (0x34/0x36/0x37) exist precisely to write new firmware into an ECU, and other services (0x27, 0x2E) exist to unlock restricted functions and change stored data. If the mechanism that gates those services — SecurityAccess — is weak, then anyone who can reach the bus the ECU listens on has a path toward the same reprogramming and configuration capability a dealer tool has, not just toward reading data.

What do the SecurityAccess (0x27), reprogramming (0x34/0x36/0x37) and data (0x22/0x2E) services actually do?

AUTOSAR's publicly available Diagnostic Communication Manager (Dcm) specification — the module that implements UDS on most production ECUs — documents these services precisely. SecurityAccess (0x27) 'provide[s] a means to access data and/or diagnostic services, which have restricted access for security, emissions, or safety reasons': a tester requests a 'seed' (an odd subfunction value), the ECU's application logic generates one via a configured Xxx_GetSeed() function, and the tester must respond with a 'key' that the ECU checks via Xxx_CompareKey(); only if that check returns success does the Dcm module raise the ECU's active security level, and every other restricted service checks that level before executing (AUTOSAR's specification states a negative response with NRC 0x33, 'Security access denied,' is returned otherwise). RequestDownload (0x34), TransferData (0x36) and RequestTransferExit (0x37) are the three-step sequence that actually moves a new firmware image into the ECU: 0x34 negotiates the transfer (address, size, block size), 0x36 carries the firmware data in sequential blocks, and 0x37 signals completion — this sequence is what a dealer tool or OEM flash tool uses to reprogram an ECU in the field. ReadDataByIdentifier (0x22) and WriteDataByIdentifier (0x2E) read and write individual data records by a 2-byte identifier — VINs, calibration values, configuration flags — and AUTOSAR's specification notes that some data identifiers are themselves gated behind a security level, so the application must separately check Dcm_GetSecurityLevel() before serving a sensitive read. DiagnosticSessionControl (0x10) is the gate in front of all of this: ECUs typically only accept reprogramming or security-elevated requests once a tester has moved the ECU out of its default session into a programming or extended diagnostic session, and AUTOSAR's specification states that a service not allowed in the active session triggers NRC 0x7F ('serviceNotSupportedInActiveSession').

What's actually wrong with SecurityAccess in practice, and is this ISO's fault or an implementation problem?

ISO 14229 standardizes the request-response mechanics of SecurityAccess (the seed request, the key-comparison, the resulting security level) but deliberately leaves the actual seed-to-key algorithm and key material to the vehicle manufacturer and ECU supplier — there is no single, mandated cryptographic algorithm in the base standard. In practice, that openness has repeatedly produced weak implementations rather than strong, varied ones. The clearest documented example comes from Charlie Miller and Chris Valasek's own 2015 Jeep Cherokee research: they reverse engineered the dealer-only wiTECH diagnostic software and found Fiat Chrysler's SecurityAccess key-derivation logic, once decrypted out of obfuscated '.esu' unlock files, 'involve[d] some secrets and simple bitwise manipulations' — the kind of ad hoc, non-cryptographic scheme security researchers have flagged across multiple OEMs, not just one. Academic work reaches the same conclusion from different angles: Koscher et al.'s 2010 'Experimental Security Analysis of a Modern Automobile' found commonly used 8- or 16-bit seed-key pairs are susceptible to brute-force; Maag, Reding and Howell's 2017 presentation on heavy-vehicle seed-key exchange found a linear mapping that made 16-bit seed-key pairs predictable; and Sekar Kulandaivel's 2021 Carnegie Mellon PhD thesis found that seeds used in some UDS challenge-response implementations were not fully random and could be influenced by ECU uptime, making them predictable without ever learning the underlying algorithm. A 2026 Synack test against a CAN/UDS simulator (explicitly described by its authors as a simulator, not a live vehicle) illustrates the same failure pattern at its simplest: an AI testing agent determined the 'key' was just the seed's bitwise complement (key = seed XOR 0xFF), letting it compute a valid key from any observed seed with one operation. None of this is a flaw in ISO 14229's text — it is a direct consequence of the standard delegating algorithm choice to each manufacturer, and some manufacturers choosing weak, short, or guessable schemes.

What does verified, independent research show about UDS actually being used in a real vehicle attack?

Two cases worth separating carefully, because they show different things. First, Miller and Valasek's 2015 Jeep Cherokee research (presented at Black Hat USA and detailed in their paper 'Remote Exploitation of an Unaltered Passenger Vehicle') is widely cited in connection with UDS, but reading the paper directly shows a more specific picture: the researchers reprogrammed the vehicle's V850 chip (the microcontroller bridging the infotainment head unit to the CAN bus) using a proprietary SPI protocol they describe as looking 'like ISO 14230 commands' (ISO 14230, KWP2000, is UDS's predecessor, not ISO 14229 itself) — sending bytes matching startDiagnosticSession, requestDownload (0x34) and requestTransferExit (0x37), and the paper explicitly notes 'no cryptographic signatures are used to verify the firmware is legitimate' on that reflash path. Separately, for the actual physical-control attacks (manipulating steering and braking), the researchers used real UDS/KWP-style diagnostic session messages sent on the vehicle's live CAN bus — for example, starting a diagnostic session with the power-steering and anti-lock-braking ECUs — but the paper states plainly that the SecurityAccess seed-key algorithm they separately reverse engineered from the dealer wiTECH tool 'was used for was re-flashing ECUs, which we didn't explore' for their remote attack; they didn't need SecurityAccess to carry out the published attack. Second, and more directly an ISO 14229 (not 14230) case: a 2024 academic paper by Chatterjee, Green and Daily (Colorado State University), presented at NDSS's VehicleSec workshop, demonstrated three concrete UDS/ISO 14229 and ISO 15765-2 vulnerabilities — a 'Read Data by ID Overload' denial-of-service, a 'Session Denial' attack that locks an ECU into a single tester's diagnostic session, and a 'Diagnostics Jam' that abuses ISO-TP flow-control ('Wait' versus 'Clear to Send') framing — against both bench-level ECUs and a real, fully equipped 2018 Freightliner Cascadia truck cab testbed. The paper also found the truck's gateway ECU, while blocking standard J1939 message-injection attacks, 'consistently permitted almost every diagnostic message, including those related to Read Data by ID, Diagnostic Session Control, and ISO-TP' — meaning the UDS-shaped traffic these attacks used was waved straight through the one chokepoint meant to segregate diagnostics from the rest of the vehicle network.

Has CISA or NHTSA published anything that names UDS or ISO 14229 specifically?

No CISA ICS advisory names UDS or ISO 14229 directly, but ICSA-25-021-03 (ZF RSSPlus, CVE-2024-12054, January 2025) concerns 'deterministic RSSPlus SecurityAccess service seeds' and recommends 'moving away from security access and implementing the latest security feature authenticate (0x29)'. An older related CISA advisory is ICSA-16-341-01 (Tesla Gateway ECU, CVE-2016-9337), which describes a firmware validation flaw letting an attacker who had already achieved web-browser compromise and local privilege escalation install 'malicious software allowing the attacker to send messages to the vehicle's CAN bus' — but that advisory's own text does not mention UDS, ISO 14229 or diagnostic services by name, so it should not be cited as a UDS-specific advisory even though it concerns ECU firmware integrity on a CAN-connected gateway. NHTSA's September 2022 'Cybersecurity Best Practices for the Safety of Modern Vehicles,' by contrast, addresses UDS-style diagnostic access directly by name in its vehicle diagnostic functionality section: it recommends that 'the use of global symmetric keys and ad-hoc cryptographic techniques for diagnostic access should be minimized' because 'public key cryptography techniques are more secure than symmetric keys valid across multiple vehicles,' and separately that vehicle and diagnostic tool manufacturers should control tools' access to systems that can perform 'diagnostic operations and reprogramming' through 'appropriate authentication and access control,' explicitly citing the history of researchers reverse engineering diagnostic tools to obtain authentication keys — language that reads as a direct response to findings like the Jeep Cherokee wiTECH research. NHTSA's guidance is a voluntary best-practices document, not a binding advisory tied to a specific product or CVE.

Sources

  1. ISO 14229-1:2020 — Road vehicles — Unified diagnostic services (UDS) — Part 1: Application layer (3rd edition, published 2020-02, 466 pages, scope/abstract record)
  2. ISO 14229-1:2013 — Road vehicles — Unified diagnostic services (UDS) — Part 1: Specification and requirements (withdrawn edition, scope record)
  3. ISO 15765-2:2016 — Road vehicles — Diagnostic communication over Controller Area Network (DoCAN) — Part 2: Transport protocol and network layer services (scope record)
  4. AUTOSAR: Specification of Diagnostic Communication Manager, AUTOSAR Classic Platform R24-11 (public PDF, SecurityAccess/0x27, DiagnosticSessionControl/0x10, RequestDownload-TransferData-RequestTransferExit/0x34-0x36-0x37, ReadDataByIdentifier/WriteDataByIdentifier)
  5. Charlie Miller and Chris Valasek: "Remote Exploitation of an Unaltered Passenger Vehicle" (IOActive/Black Hat USA 2015)
  6. Rik Chatterjee, Carson Green, Jeremy Daily (Colorado State University): "Exploiting Diagnostic Protocol Vulnerabilities on Embedded Networks in Commercial Vehicles," NDSS VehicleSec Workshop 2024
  7. CISA ICS Advisory ICSA-16-341-01: Tesla Motors Gateway ECU Vulnerability (CVE-2016-9337)
  8. NHTSA: Cybersecurity Best Practices for the Safety of Modern Vehicles (September 2022)
  9. Synack: "Using AI to Test CAN/UDS: When MCP Meets Cars" (simulator-based SecurityAccess seed-key test)
  10. ISO 14229-1:2020 preview (iTeh): foreword change list (new Authentication service, security sub-layer) and contents (APCE, ACR)
  11. ISO 14229-1:2026 (fourth edition, 2026-06) preview: foreword, replaces ISO 14229-1:2020 and incorporates Amd 1:2022
  12. CISA ICS Advisory ICSA-25-021-03: ZF Roll Stability Support Plus (RSSPlus), CVE-2024-12054 (CSAF record)
  13. NVD: CVE-2017-14937 (airbag control unit SecurityAccess, 256 key pairs)
  14. ASRG security advisory: CVE-2023-28896 (MIB3 UDS access over CAN)
  15. NVD: CVE-2026-54413 (driftregion iso14229 0x27 handler out-of-bounds read)
  16. UN Regulation No 155 (cyber security and CSMS), OJ L 82, 9.3.2021, Annex 5
  17. UN Regulation No 156 (software update and SUMS), OJ L 82, 9.3.2021, paragraphs 7.2.1.1 and 7.2.1.2.2
  18. Federal Register 2021-00390: NHTSA, Cybersecurity Best Practices for the Safety of Modern Vehicles (12 January 2021 notice, T.7 and T.8)
Was this guide helpful?

In this cluster

UDS (ISO 14229) security: the protocol that can reflash an ECU, and what guards it