Security Advisory

CVE-2021-43523: uClibc DNS Host Name Validation Flaw

Last updated:
  • CVE-2021-43523

CVE-2021-43523 is a missing validation step in the DNS resolver of uClibc and uClibc-ng before 1.0.39: host names returned by a DNS server reach applications unchecked, which can mean wrong host names, cache poisoning or injection. NVD scores it 9.6, uClibc-ng 1.0.39 fixes it, and Hitachi Energy lists AFF660/665 firmware.

Vulnerability summary

CVSS base score

9.6

Critical severity

EPSS score (FIRST)

3.1%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2021-43523 · Source: NVD

Affected components

ComponentCPEVersion range
uClibc-ng DNS resolver (libc/inet/resolv.c)cpe:2.3:a:uclibc-ng_project:uclibc-ng:*:*:*:*:*:*:*:*before 1.0.39; fixed by commit 0f822af in 1.0.39
uClibc DNS resolvercpe:2.3:a:uclibc:uclibc:*:*:*:*:*:*:*:*NVD: through 0.9.33.2, the last uClibc release; no upstream fix
Hitachi Energy AFF660/665—firmware 03.0.02 and earlier; CISA ICSA-23-234-01 names firmware 04.6.01 as the fix release (Hitachi Energy advisory 8DBD000167)

What does this mean for affected devices?

CVE-2021-43523 was reported to oss-security on 2021-11-09 by Philipp Jeitner and Haya Shulman of Fraunhofer SIT. Their disclosure says special characters in domain names returned by DNS servers are mishandled by gethostbyname(), getaddrinfo(), gethostbyaddr() and getnameinfo() in uClibc and uClibc-ng below 1.0.39. Its examples: example.com\000.attacker.com is returned as example.com, www\.example.com as www.example.com, and a host name containing a <script> tag "is not filtered even though this is not a valid hostname". The impact "depends on the application using the libc stub resolver": cache poisoning where the program caches names, or XSS and other injection where it prints or stores them.

The fix is uClibc-ng commit 0f822af, dated 2021-08-09, which adds __hnbad "to check DNS entries for validity… using the same rules glibc does" and shipped in 1.0.39. The original uClibc stopped releasing at 0.9.33.2 in 2012, and NVD's CPE covers it through that version, so a device on uClibc 0.9.x has no upstream fix. NVD scores the CVE 9.6, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H, and classes it CWE-79, matching the cross-site scripting outcome the reporters describe (NVD).

The device case is Hitachi Energy's AFF660/665. CISA's ICSA-23-234-01 (CSAF), published 2023-08-22 for the energy sector, lists firmware 03.0.02 and earlier as affected by CVE-2021-43523 together with five other open-source CVEs, among them ntpd, Linux kernel and Net-SNMP flaws. It names firmware 04.6.01 as the fixing release and refers to Hitachi Energy advisory 8DBD000167. Until then it recommends configuring only trusted DNS servers, restricting TCP/IP management protocols to trusted IP addresses, and disabling the SNMP server; CISA rates the set as remotely exploitable with low attack complexity.

CVE-2021-43523 is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). FIRST EPSS gives it 0.031, the 87.9th percentile, in the 2026-11-15 dataset (CISA KEV, FIRST EPSS).

For a device maker the question is which programs on the image resolve names and then use the result, for example in logs, web pages or shell commands. Our glibc, uClibc and musl guide explains how to tell uClibc from uClibc-ng in firmware and why 0.9.x needs a library change, our input handling fix guide covers treating resolver output as untrusted, and CVE-2022-30295 is the other uClibc DNS flaw, predictable transaction IDs.

How to fix this class of issueThis advisory's weakness class is Cross-site scripting (XSS). Our practical guide covers how to detect, fix, verify and disclose it: How to fix SQL injection, XSS, resource exhaustion and deserialization flaws in embedded firmware.

Evidence

  • Reported 2021-11-09 by Fraunhofer SIT; four resolver functions; examples example.com\000.attacker.com, www\.example.com, unfiltered script tag; impact depends on the application; patched in uClibc-ng 1.0.39. — oss-security, Philipp Jeitner
  • Commit 0f822af (2021-08-09) adds __hnbad to check DNS entries using the same rules glibc does. — uClibc-ng commit 0f822af
  • NVD Primary CVSS 3.1 9.6 (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H), CWE-79; CPE uClibc-ng before 1.0.39, uClibc through 0.9.33.2. — NVD
  • Hitachi Energy AFF660/665 firmware <= 03.0.02 affected with five other CVEs; fix firmware 04.6.01; mitigations: trusted DNS servers, restrict management protocols, disable SNMP server; Hitachi advisory 8DBD000167; published 2023-08-22; energy sector. — CISA ICSA-23-234-01 (CSAF)
  • Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.03073 (87.9th percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. oss-security: CVE-2021-43523, incorrect handling of special characters in domain names in uclibc and uclibc-ng
  3. uClibc-ng commit 0f822af: add __hnbad to check DNS entries for validity
  4. CISA ICSA-23-234-01: Hitachi Energy AFF66x (CSAF)
  5. CISA KEV
  6. FIRST EPSS

Frequently asked questions

What does CVE-2021-43523 let an attacker do?

Return host names that the C library passes to applications unchecked, such as names with an embedded NUL byte or a script tag. Depending on the application, that leads to a wrong host name, cache poisoning, or injection such as XSS (per the oss-security disclosure).

Which uClibc versions fix CVE-2021-43523?

uClibc-ng 1.0.39, through commit 0f822af. The original uClibc stopped at 0.9.33.2 and has no fix, so devices on it need a backport or a move to uClibc-ng, musl or glibc (per the uClibc-ng commit and NVD).

Which Hitachi Energy products are affected by CVE-2021-43523?

AFF660/665 with firmware 03.0.02 and earlier. CISA names firmware 04.6.01 as the fix and recommends trusted DNS servers, restricted management access and disabling the SNMP server in the meantime (per CISA ICSA-23-234-01).

Is CVE-2021-43523 exploited?

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