CVE-2025-53540: CSRF Vulnerability in Firmware Update Endpoints Allows Remote Code Execution
arduino-esp32 is an Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2 microcontrollers. Several OTA update examples and the HTTPUpdateServer implementation are vulnerable to Cross-Site Request Forgery (CSRF). The update endpoints accept POST requests for firmware uploads without CSRF protection. This allows an attacker to upload and execute arbitrary firmware, resulting in remote code execution (RCE). This vulnerability is fixed in 3.2.1.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-53540?
CVE-2025-53540 is classified as a medium severity vulnerability due to its potential for Cross-Site Request Forgery (CSRF) attacks.
How do I fix CVE-2025-53540?
To fix CVE-2025-53540, upgrade to a version of arduino-esp32 that is newer than 3.2.1 where the CSRF vulnerabilities have been patched.
What are the affected versions of arduino-esp32 for CVE-2025-53540?
The affected versions of arduino-esp32 for CVE-2025-53540 are those up to but not including version 3.2.1.
What kind of attack does CVE-2025-53540 enable?
CVE-2025-53540 enables Cross-Site Request Forgery (CSRF) attacks that could allow unauthorized actions on behalf of an authenticated user.
Which components are vulnerable in CVE-2025-53540?
The vulnerable components in CVE-2025-53540 include several OTA update examples and the HTTPUpdateServer implementation in arduino-esp32.