CVE-2025-31700: Stack-Based Buffer Overflow in Dahua ONVIF Protocol Handler
CVE-2025-31700 is a stack-based buffer overflow in Dahua security camera firmware affecting the ONVIF request handler exposed on port 80. The vulnerable code incorrectly parses the HTTP Host header and performs an unbounded copy onto a stack buffer without enforcing the destination size. Reported triggering conditions include a malformed Host header that causes arbitrary-length data to be written to stack memory. This memory corruption can overwrite saved control data, including the return address and other stack-resident register state, enabling unauthenticated remote exploitation. Depending on exploit reliability and platform protections such as ASLR, the flaw can be used to crash the service or achieve remote code execution.
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 cause denial of service by crashing the affected service or device, and in favorable conditions can lead to unauthenticated remote code execution. Reported exploitation outcomes include full device compromise and root-level command execution, allowing an attacker to subvert device integrity and trustworthiness and potentially undermine the security of monitored environments.
Mitigation
If you can’t patch tonight, do this now.
Until patched firmware can be deployed, restrict network access to affected devices and management interfaces, especially the ONVIF service on port 80. Limit exposure to trusted management networks, disable internet exposure through port forwarding or UPnP, and use network segmentation and access controls to prevent unauthenticated reachability from untrusted hosts. Monitoring for malformed ONVIF or HTTP requests may help detect exploitation attempts, but mitigation is not a substitute for vendor updates.
Remediation
Patch, then assume compromise.
Apply Dahua firmware updates that remediate CVE-2025-31700. Reported guidance indicates that firmware released after 2025-04-16 addresses the vulnerability, and Dahua released patches on 2025-07-07. Administrators should upgrade affected IPC, SD, and TPC series devices to fixed firmware versions provided by the vendor.
Exploits
3 exploits validated by Mallory's analysis.
Frequently asked questions
- Is CVE-2025-31700 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2025-31700 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-31700?
- Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2025-31700, the earliest disclosed Mar 3, 2026.
- Is there a patch for CVE-2025-31700?
- Apply Dahua firmware updates that remediate CVE-2025-31700. Reported guidance indicates that firmware released after 2025-04-16 addresses the vulnerability, and Dahua released patches on 2025-07-07.
- How severe is CVE-2025-31700?
- CVE-2025-31700 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 1.1% (66th percentile) as of Sep 25, 2026.
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.