CVE-2025-14857
Executive Summary
CVE-2025-14857 is an improper access control vulnerability in Semtech LoRa LR11xxx transceivers running early firmware versions. The vulnerability allows an attacker with physical SPI interface access to overwrite the program call stack, enabling limited arbitrary code execution during the active session. The impact is constrained: the secure boot mechanism prevents persistent firmware modification, the crypto engine isolates cryptographic keys, and all modifications are lost upon reboot or loss of physical access. No public proof-of-concept or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Uncalculated)
- Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Attack Vector: Physical (AV:P) – requires physical access to SPI interface
- Attack Complexity: Low (AC:L) – no special conditions
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L) – limited code execution, no persistence
- Availability Impact: None (A:N)
- Threat Level: Low – due to physical access requirement and non-persistent nature
Deep Dive & Mechanics
The vulnerability resides in the SPI (Serial Peripheral Interface) command handler of Semtech LoRa LR11xxx transceivers. The memory write command, intended for legitimate firmware updates or configuration, fails to enforce write protection on the program call stack. By sending crafted SPI frames, an attacker can overwrite return addresses or function pointers on the stack, hijacking program control flow.
Key Technical Details:
- Attack Vector: Physical SPI interface (e.g., via test points or exposed pins)
- Privilege Escalation: None – attacker gains code execution at the firmware level but cannot escalate to higher privilege domains
- Persistence: None – secure boot verifies firmware integrity on each boot, and RAM is volatile
- Crypto Isolation: The crypto engine is hardware-isolated, preventing key extraction even during code execution
- Impact Scope: Limited to the active session; device reset restores normal operation
Vulnerable vs. Patched Code
No patched code is available. The vulnerability exists in early firmware versions of LR11xxx transceivers. The fix would require the firmware to validate memory write addresses against a whitelist of writable regions (e.g., data RAM) and block writes to the call stack region.
Vulnerable Code Pattern (Conceptual):
void spi_memory_write(uint32_t address, uint8_t *data, uint32_t length) {
// No address validation – allows writing to stack
memcpy((void*)address, data, length);
}
Patched Code Pattern (Hypothetical):
void spi_memory_write(uint32_t address, uint8_t *data, uint32_t length) {
if (address >= STACK_START && address < STACK_END) {
return; // Reject write to stack
}
memcpy((void*)address, data, length);
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Physical access to the device’s SPI pins (e.g., via a logic analyzer or microcontroller)
- Knowledge of the SPI command format for memory write (typically opcode + address + data)
- A custom script to send SPI frames
Exploitation Steps:
- Identify SPI pins (MISO, MOSI, CLK, CS) on the PCB.
- Connect a SPI master (e.g., Raspberry Pi or Bus Pirate) to the device.
- Send a memory write command with an address within the call stack region (e.g., 0x2000XXXX).
- Overwrite a return address with a pointer to attacker-controlled shellcode in RAM.
- Trigger a function return to execute the shellcode.
Example SPI Frame (Conceptual):
import spidev
spi = spidev.SpiDev()
spi.open(0, 0)
spi.max_speed_hz = 1000000
# Write command: 0x02 (write), address 0x20001000, data 0xDEADBEEF
spi.xfer2([0x02, 0x20, 0x00, 0x10, 0x00, 0xDE, 0xAD, 0xBE, 0xEF])
Blue Team
Detection & Prevention:
- Physical Security: Enclose the device in a tamper-resistant casing; disable SPI test points in production.
- Firmware Hardening: Implement address validation for all SPI memory write commands.
- Stack Canaries: Add stack canaries to detect stack overflow attempts.
- Monitoring: Log SPI transactions and alert on writes to unexpected memory regions.
Indicators of Compromise (IOCs)
- Network: None (local physical attack)
- Host/Device:
- Unexpected SPI transactions to stack memory addresses (e.g., 0x2000XXXX)
- Device behavior anomalies (e.g., unexpected reboots, malfunction)
- File: None (no persistent files)
Detection Engineering
YARA Rule
rule CVE_2025_14857_SPI_Stack_Overwrite {
meta:
description = "Detects SPI memory write commands targeting stack region in Semtech LR11xxx firmware"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-14857"
strings:
$spi_write = { 02 [3] 20 00 } // Write command with address 0x2000XXXX
condition:
$spi_write
}
Sigma Rule
title: SPI Stack Memory Write Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SPI write commands targeting the program call stack on Semtech LR11xxx devices
author: Valters IT
logsource:
product: embedded_device
service: spi
detection:
selection:
spi_command: 0x02
address_range: 0x20000000-0x2000FFFF
condition: selection
falsepositives:
- Legitimate firmware updates (if stack region is used)
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-14857 SPI Stack Overwrite Attempt"; content:"|02|"; offset:0; depth:1; content:"|20 00|"; within:4; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Apply physical access controls to devices (e.g., tamper-proof enclosures, disable SPI test points).
- Firmware Update: Contact Semtech for a patched firmware version that enforces address validation on SPI memory writes.
- Compensating Controls: Implement stack canaries and runtime integrity checks in firmware.
- Monitoring: Deploy SPI transaction logging and alerting for anomalous memory writes.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
{/* [Security Hash: 30B8CD7698968544A6FD88AE] */}