Skip to content
Memory corruption Advisory Advanced CVE-2022-27631

DD-WRT httpd unescape memory corruption vulnerability

The URL-decoding helper in DD-WRT's httpd assumes every percent sign is followed by two hex characters. A crafted HTTP request ending a value with a lone percent sign makes the decoder read and write past the end of the string, corrupting memory.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

A memory corruption vulnerability exists in the httpd unescape functionality of DD-WRT Revision 32270 - Revision 48599. A specially-crafted HTTP request can lead to memory corruption.

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

Root cause

The decoder does not validate that two characters follow a percent sign before shifting the remainder of the string left by two positions.

Impact

A remote, unauthenticated attacker could corrupt memory in the router's web server, with the vendor's score noting low integrity impact and no confidentiality or availability impact.

What the attacker needed

Network access to the router's web interface; no authentication needed

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.

Web addresses sometimes encode characters as a percent sign plus two hex digits, and the router's web server decodes them before use. The decoding routine never checks that those two digits are actually there, so a request that stops right after a percent sign makes it copy data from beyond the end of the string. That can crash the web server or corrupt nearby 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.