CVE-2021-31226 is an INFRA:HALT heap buffer overflow in the HTTP server of HCC Embedded's NicheStack TCP/IP stack: an HTTP POST request with a URI longer than 50 bytes overflows a heap buffer through strcpy(), which Forescout rates as possible remote code execution. NVD scores it 9.8, and CISA says NicheStack and NicheLite are fixed in v4.3.
Vulnerability summary
CVSS base score
9.8
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-31226 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| HCC Embedded InterNiche TCP/IP stack (NicheStack), HTTP server | cpe:2.3:a:hcc-embedded:interniche:4.0.1:*:*:*:*:*:*:* | before v4.3 (CISA ICSA-21-217-01); NVD's CPE lists 4.0.1 |
| HCC Embedded NicheLite | — | before v4.3 (CISA ICSA-21-217-01) |
What does this mean for affected devices?
CISA's INFRA:HALT advisory ICSA-21-217-01, first released 2021-08-05 and last updated 2021-12-16 (Update B), lists HCC Embedded's InterNiche TCP/IP stack (NicheStack) and NicheLite below v4.3 as affected. For this CVE it says "a potential heap buffer overflow exists in the code that parses the HTTP POST request due to lack of size validation". The CVE record is more specific: the attacker sends "a crafted HTTP POST request with a URI longer than 50 bytes", which overflows the heap in wbs_post() through a strcpy() call. The fix CISA gives is "HCC recommends users apply release v4.3 or later".
NVD scores it 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, with CWE-787 (out-of-bounds write), and its CPE configuration names InterNiche 4.0.1 (NVD). CISA's advisory calculated 9.1 with no confidentiality impact (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H) and classes it as CWE-20, which is the figure our guide's INFRA:HALT table quotes.
The exposure is the web server built into the stack. Forescout's INFRA:HALT research, published 2021-08-04 with JFrog, lists this bug as HCCSEC-000003 with remote code execution as the potential impact, and says that of more than 6,400 NicheStack devices it found on Shodan in a query of 2021-03-08, 6,360 answered with the "InterNiche Technologies Webserver" banner. CERT/CC's VU#608209 notes that a lack of SBOMs "complicated this outreach and the much-needed identification of impacted devices". The device-vendor advisories linked from CERT/CC and CISA (Siemens SSA-789208, Phoenix Contact VDE-2021-032, Mitsubishi Electric 2021-022) list other INFRA:HALT CVEs and do not name this one.
The CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). FIRST EPSS gives it 0.0307, the 87.9th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS).
Device makers should check whether the NicheStack HTTP server is compiled in and reachable, then move to v4.3 or later or request HCC's patch. Forescout's interim advice for the HTTP bugs is to disable HTTP if it is not needed, or allow-list HTTP connections to the device. Our embedded TCP/IP stack vulnerabilities guide covers identifying NicheStack in a build, our embedded web server guide covers the wider risk of HTTP servers in firmware, and the DNS client overflow from the same disclosure is CVE-2020-25928.
Evidence
- Heap buffer overflow parsing HTTP POST request due to lack of size validation; CWE-20; CVSS 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H); InterNiche stack and NicheLite < 4.3; HCC recommends v4.3 or later. — CISA ICSA-21-217-01 (CSAF)
- NVD CVSS v3.1 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), CWE-787; URI longer than 50 bytes; heap overflow in wbs_post() via strcpy(); CPE interniche 4.0.1. — NVD
- HCCSEC-000003, HTTP, RCE; 6,360 devices with 'InterNiche Technologies Webserver' banner on Shodan (query 2021-03-08); mitigation: disable HTTP or allow-list HTTP connections. — Forescout Research Labs: INFRA:HALT
- Lack of SBOM complicated identification of impacted devices; vendor statements from Siemens and Phoenix Contact. — CERT/CC VU#608209
- Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
- EPSS 0.0307 (87.9th percentile), dataset 2026-11-16, read 2026-11-16. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Which NicheStack version fixes CVE-2021-31226?
CISA's ICSA-21-217-01 lists the InterNiche TCP/IP stack and NicheLite below v4.3 as affected and says "HCC recommends users apply release v4.3 or later". Forescout says HCC's patches are available on request for device makers on older copies.
Why do NVD and CISA give CVE-2021-31226 different scores?
NVD's own assessment is 9.8 with high confidentiality, integrity and availability impact. CISA's ICSA-21-217-01 calculated 9.1 with no confidentiality impact (C:N/I:H/A:H). Both rate it critical; this page uses NVD's score for the severity tile.
What does an attacker need to exploit CVE-2021-31226?
Network access to the device's NicheStack HTTP server and a POST request whose URI is longer than 50 bytes; no authentication is needed under either CVSS vector. Devices that do not build or expose the HTTP server do not process the request.
Is there a workaround if the firmware cannot be updated?
Forescout recommends disabling HTTP if it is not needed, or allow-listing which hosts may open HTTP connections to the device. CERT/CC suggests isolating affected devices and blocking anomalous traffic until the vendor ships a fixed image.
Questions about this page?