Engineer working on a laptop connected to a device test rig, surrounded by wiring harnesses and test hardware

Firmware vulnerabilities & fixes

Secure firmware OTA update design, explained

Last updated:

A secure firmware over-the-air (OTA) update protects three things at once: that the image came from the real vendor, that it has not been altered since it was signed, and that it cannot be swapped for an older, vulnerable version. In practice that means a cryptographically signed manifest verified by code the device trusts before any bytes reach flash, transport protection that is never treated as a substitute for that signature check, a monotonically enforced anti-rollback version check, and a recovery path that still works if any of those checks fail — so one bad update does not permanently brick the device.

Facts and quotes below are drawn directly from NIST SP 800-193, IETF RFC 9019/9124 and the cited ENISA report and TUF specification; confirm exact clause wording against those primary documents before citing this guide as authoritative on a single requirement.

Key takeaways

  • An OTA pipeline that only asks "is this image signed" is checking one control out of several that have to hold together.
  • TLS on the download connection authenticates the server and encrypts the pipe; it does not authenticate the firmware.
  • No anti-rollback check at all — any validly signed image installs, including an old one with a known, public CVE.
  • Treat the update channel's own code as part of the attack surface.

The checks a device runs before it will flash new firmware

An OTA pipeline that only asks "is this image signed" is checking one control out of several that have to hold together. NIST SP 800-193 and the IETF's SUIT architecture (RFC 9019) describe largely the same set, organized slightly differently:

Control What it stops Primary source
Signature verification anchored in a Root of Trust for Update An attacker without the signing key producing an image the device will accept NIST SP 800-193 §4.2.1.1
Manifest integrity (signed metadata, not just the payload) Tampering with version, target-device or installation instructions after signing RFC 9124 (SUIT manifest)
Monotonic anti-rollback sequence number Reinstalling an older, still-validly-signed image with a known vulnerability RFC 9124 §3.2; NIST SP 800-193 §4.2.1.3
Non-bypassability of the update path Flashing firmware through a diagnostic port or DMA path that skips verification entirely NIST SP 800-193 §4.2.1.3
Recovery/automatic rollback on failure A corrupted or half-applied update permanently bricking the device NIST SP 800-193 §4.1.4 (RTRec)

How does anti-rollback protection actually stop an attacker?

A device that only checks "is this image validly signed" will happily reinstall an old firmware version — one the vendor already patched a known vulnerability in — because an old, legitimately signed image is still a validly signed image. RFC 9124 closes that gap by requiring every SUIT manifest to carry a monotonically increasing sequence number specifically "to prevent malicious actors from reverting a firmware update against the policies of the relevant authority," which "must not wrap around." On the device side, the update agent compares that number to the one in the currently installed manifest and refuses to apply anything that does not strictly increase it. NIST SP 800-193 frames the attacker motive directly: unauthorized rollback "could allow an attacker to restore a vulnerable firmware image, which in turn could allow the attacker to damage the device or inject malware" — and it explicitly does not forbid rollback outright, since a legitimate rollback path is sometimes the only way to recover from a bad update. It requires that path to carry its own authorization (physical presence, in SP 800-193's own examples) rather than being the update agent's default behavior for any validly signed image.

Why TLS does not make a firmware update channel secure

TLS on the download connection authenticates the server and encrypts the pipe; it does not authenticate the firmware. RFC 9019 is explicit that a firmware update's end-to-end security rests on three separately-stated properties — authentication of "the author(s) creating firmware images and manifests," integrity protection so "no third party can modify the manifest or the firmware image," and, optionally, confidentiality — all of which the architecture roots in signatures verified by the device itself, not in whatever transport carried the bytes. The practical consequence: a compromised update server, a malicious CDN edge, or a man-in-the-middle holding a trusted-but-wrong certificate can each terminate TLS perfectly correctly while serving firmware the device's actual owner never authorized. RFC 9019 names the real stakes bluntly — "an update is essentially authorized remote code execution, so any security problems in the update process expose that remote code execution system" — which is why a signed manifest, verified offline against a key the device itself holds, has to be the control that actually gates installation, with TLS as defense-in-depth around it, not a substitute for it.

Failure modes auditors look for in an OTA update design

  • No anti-rollback check at all — any validly signed image installs, including an old one with a known, public CVE.
  • A single online signing key with no compromise plan. The Update Framework's own threat model flags this directly: a design should survive "an attacker who is able to compromise a single key or less than a given threshold of keys" without compromising clients fleet-wide; a lone online key is the opposite of that.
  • No manifest expiry/freshness check — TUF calls the resulting gap a "freeze attack," where a device keeps accepting stale metadata and never learns a critical update exists.
  • Verification happening after the image is already written to the active flash region, rather than, per NIST SP 800-193 §4.2.1.1, "prior to the non-volatile storage completion of the update process" — by the time a late check fails, the bad image may already be what the bootloader runs next.
  • A bypassable update path — a diagnostic UART, JTAG header, or legacy unauthenticated update mode left reachable in production that skips the signed-update flow entirely.
  • No automatic or manual recovery from a failed/corrupted update. ISO 24089's software-update-engineering process and NIST SP 800-193's Root of Trust for Recovery both exist because "verify, then refuse to boot" with no recovery path turns a detected attack (or just a bad update) into a bricked fleet.
  • No record of which update-stack components (TLS library, manifest parser, signature-verification routine) shipped in a given build. ENISA's 2019 secure-SDLC report lists "secure remote (over-the-air) update delivery" as an ongoing Maintenance and Disposal obligation, not a one-time launch task — which only works if a team still knows what is running in that update path on an already-shipped device; this is exactly the gap a firmware SBOM is built to close.

A workable starting point

  1. Separate "is this update signed" from "is this update newer."Treat them as two independent, both-mandatory checks, not one combined "is this valid" gate — the rollback check still has to run even on a perfectly, validly signed old image.
  2. Verify fully before touching the active flash region, not after a partial write — NIST SP 800-193's own requirement is that signature verification completes "prior to the non-volatile storage completion of the update process."
  3. Treat the update channel's own code as part of the attack surfaceThe TLS stack, the manifest parser and the signature-verification library are themselves firmware that can carry memory-corruption or logic bugs; an update mechanism that is hard to bypass cryptographically but has an exploitable parser has not actually closed the gap.
  4. Plan key compromise before it happens, not after. A single online signing key protecting an entire fleet is the scenario TUF's own threat model is built around — multi-party or threshold signing, and a documented key-rotation/revocation path, cost far less to design in up front than to retrofit after a key leaks.
  5. Pair every verification control with a recovery controlA device that refuses a bad update but cannot recover from one is not meaningfully safer than one with no verification at all, from the fleet-operator's perspective — see NIST SP 800-193: Platform Firmware Resiliency for the Protection/Detection/Recovery model this sits inside.
  6. If a disclosed vulnerability lives in the update stack itself, the same 24-hour-from-awareness EU Cyber Resilience Act clock applies as to any other actively exploited flaw — see CRA's 24-hour vulnerability reporting duty.

AI-assisted analysis: what SoftWSP actually checks in an update stack

SoftWSP's firmware analysis identifies the update-related components actually present in a shipped image — the TLS library, manifest/signature-verification library, and update-agent binary — and records them in the device's firmware SBOM, the same way it inventories every other component. From there, AI-assisted analysis matches each identified component and version against known CVE data, the same CVE-matching step used across the rest of a scan, so a known vulnerability in, say, an outdated mbedTLS or a bundled signature-verification library in the update path is flagged like any other component-level finding. Where a firmware image appears to implement its own update-installation logic but no recognizable signature-verification library or routine is present in that code path, that absence is flagged as a finding for an engineer to confirm — not treated as proof the update mechanism is insecure, since verification can also be implemented in a way static analysis does not recognize (a vendor-specific routine, or logic in a separate secure bootloader image outside the scanned file). An engineer reviews every flagged finding before it reaches a report; SoftWSP does not claim to test whether a device's anti-rollback check or signing key management is actually enforced correctly at runtime, only what the static evidence in the firmware image shows.

Secure boot and a hardware root of trust is the mechanism an OTA update's signature check ultimately has to be anchored in — without it, the verification code that checks a new image's signature is itself just more software an attacker who controls storage could replace. For the testing methodology used to independently verify boot-chain and update claims rather than take a vendor's word for them, see OWASP's firmware security testing methodology.

SoftWSP's Device & Firmware Security service reviews an update pipeline's signing, manifest and anti-rollback design against the device's actual constraints, and flags update-stack components with known CVEs in the resulting firmware SBOM: see Device & Firmware Security.

This guide draws on NIST's and the IETF's published technical documents, the cited ENISA report, and the publicly available TUF specification, cross-checked against each primary source directly. It is not a substitute for those documents' own text, or for an engineer's assessment of a specific device's update architecture.

Put this guide to work

Frequently asked questions

What are the minimum technical controls an auditor expects in a secure firmware OTA update?

NIST SP 800-193 (Platform Firmware Resiliency Guidelines) states the rule an auditor checks against directly: "One or more authenticated update mechanisms anchored in the RTU [Root of Trust for Update] shall be the exclusive means for updating device firmware," and "the digital signature of a new or recovery firmware update image shall be verified by an RTU or a CTU prior to the non-volatile storage completion of the update process" (Section 4.2.1.1). A separate, equally load-bearing requirement closes the obvious bypass: "the authenticated update mechanism shall be capable of preventing unauthorized updates of the device firmware to an earlier authentic version that has a security weakness" (Section 4.2.1.3) — anti-rollback protection, not just signature verification. An auditor who only checks "is the firmware signed" and stops there has checked one of at least three independent controls.

How does anti-rollback (anti-downgrade) protection actually work in practice?

The IETF's SUIT manifest format (RFC 9124, "A Manifest Information Model for Firmware Updates in IoT Devices") requires every manifest to carry a "monotonically increasing (unsigned) sequence number to prevent malicious actors from reverting a firmware update against the policies of the relevant authority" — a device compares the new manifest's sequence number against the currently installed one and refuses any update that does not strictly increase it. NIST SP 800-193 explains why this matters beyond convenience: "updates to earlier firmware versions, sometimes called 'rollback,' may provide a means to recover from a firmware update that is not functioning correctly. However, unauthorized rollback could allow an attacker to restore a vulnerable firmware image, which in turn could allow the attacker to damage the device or inject malware" (Section 4.2.1.3, note). A legitimate rollback path still has to exist for recovery — SP 800-193 just requires it to carry its own authorization, not be the default accept-any-older-signed-image behaviour.

Why isn't TLS on the download channel enough to secure a firmware update?

TLS protects the pipe the update travels through; it says nothing about whether the content at the other end of that pipe is what the device's owner actually authorized. RFC 9019 ("A Firmware Update Architecture for Internet of Things") separates the two properties explicitly: authentication ("the device can cryptographically identify the author(s) creating firmware images and manifests") and integrity protection ("no third party can modify the manifest or the firmware image... the device needs to verify the signature covering the manifest") must both hold regardless of transport, because "an update is essentially authorized remote code execution, so any security problems in the update process expose that remote code execution system." A compromised update server, a malicious CDN edge node, or a man-in-the-middle with a trusted-but-wrong certificate can all terminate TLS correctly while serving unauthorized firmware — which is exactly why the architecture puts the signature check on the image and manifest themselves, verified by code on the device, not on the transport session.

What does a device need to check besides "is this image signed by the right key"?

The Update Framework (TUF) — a CNCF-graduated specification built specifically around software/firmware update security — names several attacks a single signature check does not stop on its own: a "freeze attack" (an attacker keeps serving the same, outdated-but-still-validly-signed metadata so a device never learns an update exists), a "mix-and-match attack" (combining genuinely-signed pieces that were never meant to ship together), and "vulnerability to key compromises," where "an attacker who is able to compromise a single key or less than a given threshold of keys" should still not be able to compromise clients. Applied to firmware OTA specifically, that means checking a manifest's expiry/freshness, not just its signature, and treating a single online signing key as a design weakness worth asking about — not an acceptable default for a fleet-wide update channel.

Sources

  1. NIST Special Publication 800-193, Platform Firmware Resiliency Guidelines (May 2018, Final)
  2. IETF RFC 9019: A Firmware Update Architecture for Internet of Things (April 2021)
  3. IETF RFC 9124: A Manifest Information Model for Firmware Updates in IoT Devices (January 2022)
  4. ENISA: Good Practices for Security of IoT — Secure Software Development Lifecycle (November 2019)
  5. The Update Framework (TUF) specification, Attacks and Weaknesses section (CNCF graduated project)
Was this guide helpful?

In this cluster