Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
3.7

CVE-2026-104377: Zephyr TFTP client may read beyond memory on bad error message

CVE-2026-104377 · published 3 days ago
Summary

The TFTP client component in Zephyr does not ensure that error messages from a server are properly terminated, so a malicious or faulty server can send a full-size error packet that causes the client to read past the end of its buffer. This can expose nearby memory contents or cause a crash when the application processes the message. Update Zephyr to the version that adds the missing termination, or avoid processing error messages from untrusted sources.

What to do
  • Update zephyrproject zephyr to version 4.3.2 or later.
Affected software
VendorProductAffected versions
zephyrproject zephyr < 4.3.2
Original advisory text
Out-of-bounds read via unterminated TFTP ERROR message in Zephyr TFTP client
The Zephyr TFTP client library (subsys/net/lib/tftp/tftp_client.c) reports server ERROR packets to the application through a TFTP_EVT_ERROR event whose evt.param.error.msg field is a bare char * pointing at client->tftp_buf + TFTP_HEADER_SIZE, with no length. RFC 1350 requires the ERROR message to be NUL-terminated, but tftp_get(), tftp_put() and send_data() never checked or enforced this before invoking the callback.

A TFTP server (or an on-path/spoofing attacker able to inject a UDP datagram from the server's address) can answer a client request with a full-size 516-byte ERROR datagram whose message has no terminator. The callback then receives a string that runs to the end of tftp_buf, which is the last member of the application-owned struct tftpc, so any string operation on it (for example the %s logging done by the in-tree sample and net tftp shell callbacks) reads past the end of the object until a stray zero byte is found. A 4-byte ERROR with no message similarly exposes stale, possibly unterminated buffer contents from the previous packet.

The impact is an out-of-bounds read of memory adjacent to the struct tftpc object in the context of the application callback. Depending on what the application does with the message, this can disclose adjacent memory (e.g. into logs or anything the application forwards) or fault if the read reaches unmapped or protected memory. No out-of-bounds write is possible. The fix NUL-terminates the message inside tftp_buf at the received length, clamped to the last byte of the buffer.
Fix within
Internet-facing 14 days
Internal 60 days
  • Not known to be exploited
  • Can be exploited automatically (estimated)
  • Gives an attacker partial control (estimated)
Severity
3.7 Low
Exploitation
<1% chance of attack within 30 days
Type
CWE-125Out-of-bounds Read
Timeline
Published29 Nov 2026
Updated2 Dec 2026
First seen29 Nov 2026
Sources
CVE-2026-104377 · MITRE
Track software like this
Free during beta