Security Advisory

CVE-2019-19945: OpenWrt uhttpd POST Length Crash

Last updated:
  • CVE-2019-19945

CVE-2019-19945 is an integer signedness flaw in uhttpd, the web server that serves the LuCI interface on OpenWrt router firmware: a POST to a CGI script with chunked encoding and a huge Content-Length crashes it. OpenWrt 18.06.0 to 18.06.5 and 19.07.0 release candidates are affected; 18.06.6 and 19.07.0 fix it. NVD scores it 7.5.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

1.6%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2019-19945 · Source: NVD

Affected components

ComponentCPEVersion range
OpenWrt uhttpd (firmware web server for LuCI)cpe:2.3:o:openwrt:openwrt:*:*:*:*:*:*:*:*OpenWrt 18.06.0 through 18.06.5 and 19.07.0-rc1/rc2 (NVD); fixed in 18.06.6 and 19.07.0, uhttpd source date 2019-12-22 (OpenWrt advisory 2020-01-13-1)

What does this mean for affected devices?

CVE-2019-19945 is an out-of-bounds read (CWE-125) caused by an incorrect type conversion (CWE-681) in OpenWrt's uhttpd. NVD's record says uhttpd "in OpenWrt through 18.06.5 and 19.x through 19.07.0-rc2 has an integer signedness error" that leads to out-of-bounds heap access and a crash, triggered by a POST to a CGI script with "Transfer-Encoding: chunked" and "a large negative Content-Length value". NVD scores it 7.5 with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

OpenWrt's security advisory 2020-01-13-1 gives the detail. A Content-Length that "exceeds 2^31 and is interpreted as a signed negative number" is stored in r->content_length and passed as a negative read length to ustream_consume, which "will set the internal ustream buffer pointer to an invalid address". The advisory's proof of concept is a three-line POST to /cgi-bin/luci, the path every LuCI install exposes. It names OpenWrt 18.06.0 to 18.06.5 as affected and says the fix is in OpenWrt 18.06.6, 19.07.0 and later releases; older releases such as 15.05 and LEDE 17.01 are end of life with no fix. The issue was found by Jan-Niklas Sohn, whose proof-of-concept repository is public.

This is a firmware component, not an add-on package. OpenWrt's uHTTPd documentation says that on current releases "the uHTTPd webserver is both already installed and activated", and warns that "by default, uHTTPd is bind to 0.0.0.0 which also includes the WAN port of your router". The fix landed as a package bump to uhttpd source date 2019-12-22 (upstream commit 5f9ae57, "client: fix invalid data access through invalid content-length values"), backported to the 18.06 branch in commit b901563. uhttpd has no version numbers, so the package version string, which carries that source date, is how a firmware scan tells a fixed build from an affected one; our embedded web server vulnerabilities guide explains mapping uhttpd dates to fixes. Devices built from vendor SDKs that fork OpenWrt carry whatever uhttpd date the SDK pinned.

The CVE is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0155, the 75.5th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS).

On a running router, opkg update; opkg upgrade uhttpd installs the fixed package, as the advisory says; a device maker rebuilds on 18.06.6, 19.07.0 or a later release. In both cases bind uhttpd to the LAN interface only. Our memory corruption fix guide covers length-field parsing bugs of this kind, and CVE-2023-52160 is another OpenWrt firmware component in the same catalog.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • uhttpd in OpenWrt through 18.06.5 and 19.x through 19.07.0-rc2: integer signedness error, OOB heap access, crash via chunked POST with large negative Content-Length; NVD CVSS v3.1 7.5 (A:H); CWE-125, CWE-681. — NVD
  • Content-Length > 2^31 stored as negative r->content_length, passed to ustream_consume; PoC POST /cgi-bin/luci; affected 18.06.0-18.06.5; fixed in 18.06.6, 19.07.0; fix commits dated 2019-12-22; found by Jan-Niklas Sohn. — OpenWrt Security Advisory 2020-01-13-1
  • 18.06 backport commit b901563 (2019-12-22) bumps uhttpd to source date 2019-12-22, including 5f9ae57 "client: fix invalid data access through invalid content-length values". — OpenWrt git (GitHub mirror)
  • uHTTPd is installed and activated by default and binds to 0.0.0.0, including WAN, by default. — OpenWrt uHTTPd documentation
  • Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.01551 (75.5th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. OpenWrt Security Advisory 2020-01-13-1: uhttpd invalid data access via HTTP POST request
  3. OpenWrt commit b901563: uhttpd update for openwrt-18.06
  4. OpenWrt: uHTTPd web server configuration
  5. mclab-hbrs: OpenWrt uhttpd denial-of-service proof of concept
  6. CISA KEV
  7. FIRST EPSS

Frequently asked questions

Which OpenWrt versions are affected by CVE-2019-19945?

OpenWrt 18.06.0 to 18.06.5 and the 19.07.0 release candidates rc1 and rc2. The fix is in OpenWrt 18.06.6, 19.07.0 and later releases; 15.05 and LEDE 17.01 are end of life (per NVD and OpenWrt advisory 2020-01-13-1).

How is CVE-2019-19945 triggered?

With one HTTP POST to a CGI path such as /cgi-bin/luci that sends both "Transfer-Encoding: chunked" and a Content-Length above 2^31, which uhttpd reads as a negative number and uses as a read length (per OpenWrt advisory 2020-01-13-1).

How do I tell whether a firmware image has the fixed uhttpd?

uhttpd has no version numbers; its package version carries a source date. A uhttpd built from source date 2019-12-22 or later includes fix 5f9ae57, and an image older than that needs the update (per the OpenWrt advisory and commit b901563).

Is CVE-2019-19945 known to be exploited?

It is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0155, the 75.5th percentile, in the 2026-11-16 dataset (per CISA KEV and FIRST EPSS).