Skip to content
Memory corruption Advisory Advanced CVE-2025-66176

Hangzhou Hikvision Digital Technology Co., Ltd. Face Recognition Modules SADP XML parsing stack-based buffer overflow vulnerability

The SADP XML parser in Hikvision face recognition terminal firmware copies tag names into fixed 0x80-byte stack buffers without bounding the length. An attacker sending a crafted SADP packet over the local network could overflow the stack and potentially execute code remotely.

A member Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A stack-based buffer overflow vulnerability exists in the SADP XML parsing functionality of Hangzhou Hikvision Digital Technology Co., Ltd. Ultra Face Recognition Terminal 3.7.60250613 and Face Recognition Terminal for Turnstyle 3.7.0240524 (under emulation).

a member, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the parser increments tag length counters without an upper bound and then uses those lengths in strncpy calls into fixed 0x80-byte stack buffers.

Impact

An attacker on the adjacent network could achieve remote code execution with high confidentiality, integrity and availability impact, though the payload is limited to 0x800 bytes and may contain only one null byte at the end.

What the attacker needed

Network access to UDP port 37020; payload of at most 0x800 bytes; single null byte only at the end

The fix

The vendor released a patch on 2026-01-12.

How it was found

  1. Send a SADP packet to the device's multicast address on UDP port 37020.
  2. The packet is received into a buffer of at most 0x800 bytes and passed to the XML parser.
  3. The parser counts the length of the start or close tag name.
  4. During finalisation the name is copied into a 0x80-byte stack buffer using the unbounded length.
  5. A long enough tag name overflows the stack frame and can control the program counter.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

These access-control terminals listen on the local network for a discovery protocol that carries XML text. The code that reads tag names from that text copies them into a small fixed-size space on the stack without checking how long they are, so a long name spills over into neighbouring memory. That spill can let an attacker redirect the program and run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by A member

View all

110 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.