CVE-2025-31701: Unauthenticated RCE in Dahua RPC Upload Handler
CVE-2025-31701 is a buffer overflow vulnerability in Dahua camera firmware affecting the handler for an undocumented HTTP POST endpoint used for RPC file upload functionality. The vulnerable code copies the value of the HTTP Cseq header into a fixed buffer in the .bss segment using strncpy without proper bounds checking. Because the copy operation does not enforce the destination buffer size, an unauthenticated attacker can send a specially crafted request that overwrites adjacent global data in memory. Reported exploitation details indicate that nearby overwritten objects can include structures containing function pointers used by session-management logic, enabling control-flow hijacking and remote code execution. Where code execution is not achieved, the memory corruption can still crash the service and cause denial of service.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can lead to unauthenticated remote code execution on affected devices, including full compromise of the camera firmware execution context. The vulnerability can also be used to corrupt process memory and disrupt device services, causing crashes or persistent unavailability. Because the affected product class is security and surveillance equipment, compromise can undermine device integrity and the trustworthiness of monitoring operations.
Mitigation
If you can’t patch tonight, do this now.
Until patched firmware is deployed, restrict network access to affected devices to trusted management networks only, block unneeded access to the vulnerable HTTP interface, and prevent exposure through direct internet reachability, port forwarding, and automatic gateway publishing features. Segment surveillance devices from general user networks, disable unnecessary services where operationally possible, and monitor for abnormal crashes or unexpected device behavior that may indicate exploitation attempts. Mitigations reduce exposure but do not eliminate the underlying memory corruption flaw.
Remediation
Patch, then assume compromise.
Apply Dahua firmware updates that remediate CVE-2025-31701. Reported vendor guidance indicates that affected firmware released before 2025-04-16 is vulnerable and that later firmware versions contain the fix. Administrators should upgrade all affected Dahua IPC, SD, and TPC series devices to vendor-provided patched firmware and verify that unsupported or unpatched devices are removed from service or replaced.
Exploits
3 exploits validated by Mallory's analysis.
Frequently asked questions
- Is CVE-2025-31701 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2025-31701 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-31701?
- Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2025-31701, the earliest disclosed Mar 3, 2026.
- Is there a patch for CVE-2025-31701?
- Apply Dahua firmware updates that remediate CVE-2025-31701. Reported vendor guidance indicates that affected firmware released before 2025-04-16 is vulnerable and that later firmware versions contain the fix.
- How severe is CVE-2025-31701?
- CVE-2025-31701 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 0.87% (60th percentile) as of Sep 25, 2026.
Recent activity
10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.