Skip to content
Memory corruption Advisory Advanced CVE-2023-35967CVE-2023-35968

Yifan YF325 gwcfg_cgi_set_manage_post_data stack-based buffer overflow vulnerabilities

The Yifan YF325 router's HTTP server parses the Content-Length header without validating it, then uses that value to allocate a buffer via malloc or realloc with an integer overflow. An attacker can send a crafted request to trigger a heap buffer overflow, potentially leading to remote code execution.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

Two heap-based buffer overflow vulnerabilities exist in the gwcfgcgisetmanagepostdata functionality of Yifan YF325 v1.020221108. A specially crafted network request can lead to a heap buffer overflow.

Francesco Benvenuto, 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

Impact

An attacker could send a network request to trigger a heap buffer overflow, potentially leading to remote code execution with high confidentiality, integrity, and availability impact.

What the attacker needed

Network access to the router's web interface

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.

This router's web server reads the size of incoming data from a header called Content-Length. It adds one to that number to make room for a null terminator, but if the number is huge, the addition wraps around to a tiny value, so the buffer is too small. The server then copies the full request body into that small buffer, overflowing it and letting an attacker corrupt memory.

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 Francesco Benvenuto

View all

152 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.