Introduction
A stack-based buffer overflow in the D-Link R18 A1 router can be triggered by an attacker who never authenticates, because the firmware's own action table marks the vulnerable handler as authentication-free. CVE-2026-138362 carries a CVSS 4.0 and 3.1 base score of 10.0, and a public proof of concept is already referenced in the CVE record. Security teams running this hardware should triage it promptly.
The D-Link R18 is a consumer and small office wireless router. D-Link Corporation, established in 1987, reports 90 operating and sales locations across 43 countries, so devices like the R18 are deployed widely across home and small business networks. That reach is what makes memory corruption bugs in the router's web management service worth close attention.
Technical Information
The affected component is httpd, and the vulnerable function is GetDeviceSettings. The weakness is classified under CWE-119 (improper restriction of operations within the bounds of a memory buffer) and CWE-121 (stack-based buffer overflow). The confirmed affected configuration is the D-Link R18 A1 running firmware 1.20.B01, with VulDB acting as the assigning CNA.
Root Cause
According to the accepted VulDB submission (#1075854), the GetDeviceSettings handler parses XML nodes named Target and copies each node's value into a fixed-size stack buffer without any length validation. This is a classic unchecked copy into a stack allocation, consistent with a strcpy style operation where the destination buffer size is never compared against the attacker-controlled input length.
Under MITRE's CWE-121 classification, writing beyond the end of a stack buffer can corrupt security-critical data such as the saved return address or frame pointer, with possible consequences including crashes, memory modification, and unauthorized code execution. Those are general consequences of the weakness class rather than a demonstration of every outcome on this specific router.
Overflow Mechanics
The submission metadata is precise about the trigger:
- A
Targetvalue of 128 bytes is enough to overwrite saved control data on the stack. - Cyclic pattern testing placed control of the saved return address at offset 68 from the start of the
Targetvalue. - The saved return address target is MIPS style (
$ra), which is consistent with D-Link router firmware.
Control over the saved return address at a known offset is what lets an attacker hijack execution flow, with denial of service as the baseline outcome.
Why It Is Pre Authentication
The most consequential detail is that the firmware's action table marks both GetDeviceSettings and Login as authentication-free. The code path to the vulnerable copy can be reached with no valid account, no session cookie, and no API-CONTENT value. The attack is therefore fully pre-authentication and remote, which aligns with the published CVSS vectors.
Published Scoring
The CVE record publishes the following vectors:
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P/RL:X/RC:C
Both resolve to a 10.0 Critical base score: network attack vector, low attack complexity, no privileges required, and no user interaction. The E:P exploit maturity code denotes a proof of concept. VulDB also publishes a temporal score of 9.4, distinct from its 10.0 base rating. These are CNA and VulDB ratings. The retrieved NVD page returned "CVE ID Not Found" at the time of review, so an independent NVD assessment was not available.
Attack Flow
Based on the briefing, exploitation proceeds as follows:
- The attacker sends a crafted HNAP/XML request to the router's
httpdservice invoking theGetDeviceSettingsaction. - The request contains an oversized
Targetelement of at least 128 bytes. - Because
GetDeviceSettingsis authentication-exempt, no credentials, session, orAPI-CONTENTvalue are supplied. - The handler copies the
Targetvalue into the fixed-size stack buffer without bounds checking. - Bytes at offset 68 of the
Targetvalue land in the saved return address, yielding control flow hijack or, at minimum, denial of service.
The network attack rating does not establish that any particular deployment exposes the vulnerable service to the public Internet. That depends on local configuration.
Proof of Concept
A public proof of concept exists for CVE-2026-138362. The CVE record, with VulDB as the CNA, states that "The exploit is now public and may be used." and lists the researcher repository under its references with the exploit tag. The CVSS exploit maturity code is E:P (Proof of Concept), and the vulnerability was reported by VulDB user "Luminaa".
The referenced GitHub repository (owner jiangnandiyishenqin, created 2026-11-05, default branch main) is public. Its only content is a single binary archive, R18A1.zip (approximately 885 KB), available at the raw GitHub path. The repository has no README or committed source files in the tree. The write-up and trigger materials are packaged inside the ZIP. The archive itself was not unpacked or independently executed as part of this verification, due to its binary content.
The reproducible details come from the accepted VulDB submission #1075854:
- The
GetDeviceSettingshandler copies eachTargetXML node value into a fixed-size stack buffer without length validation. - A 128-byte
Targetvalue overwrites saved control data. - The saved return address (
$ra) is controlled at offset 68 from the start of theTargetvalue. - Both
GetDeviceSettingsandLoginare authentication-free in the action table, so the vulnerable copy is reachable pre-authentication.
In short, an attacker sends a crafted HNAP/XML request invoking GetDeviceSettings with an oversized Target element of at least 128 bytes, and bytes at offset 68 land in the saved $ra. No exact exploit code snippet could be reproduced here, because the PoC is distributed solely as the binary R18A1.zip rather than as plaintext source. The official CVE and VulDB classification as a public PoC, the identified exploit repository, and the detailed offset and trigger metadata together constitute viable public PoC evidence.
Affected Systems and Versions
- Product: D-Link R18
- Hardware revision: A1
- Firmware: 1.20.B01
- Vulnerable component:
httpd - Vulnerable function:
GetDeviceSettings
The CVE record identifies R18 A1 version 1.20.B01 specifically. It does not establish that every R18 revision, earlier firmware release, or other D-Link model is affected. Administrators should check hardware revision and installed firmware version before drawing conclusions about exposure.
Interim Mitigation
No CVE-specific fixed firmware build was identified in the reviewed sources. VulDB states that no mitigation is known and suggests considering replacement of the affected product. OffSeq recommends two interim controls for this CVE: restrict management interface access to trusted users only, and monitor for suspicious activity. These are access control and exposure reduction measures, not a verified correction of the overflow.
Two earlier D-Link documents should not be mistaken for a fix. Advisory SAP10398 addressed CVE-2024-6044 and CVE-2024-6045 and identified firmware v1.10.01 for the R18 entry, which demonstrates update capability but is not a current fix. The official R18 A1 V1.20 release note, dated August 11, 2026, describes a fix for unexpected reboots under heavy 5 GHz Wi-Fi traffic, not this overflow.
Vendor Security History
D-Link has a documented security track record relevant to context. In July 2019, the FTC announced a settlement of litigation over allegations that D-Link misrepresented the security of wireless routers and connected cameras. The settlement required security planning, threat modeling, vulnerability testing before release, ongoing monitoring, automatic firmware updates, acceptance of researcher reports, and biennial independent assessments for 10 years. These are settlement obligations, not evidence that the allegations were adjudicated or that D-Link is currently noncompliant.
The vendor also maintains a Product Security Team responsible for receiving, investigating, and publicly reporting vulnerability information, and has delivered product-specific remediation in the past, as with R18 advisory SAP10398. Separately, FortiGuard Labs observed increased activity during October and November 2024 from the Mirai variant FICORA and the Kaiten variant CAPSAICIN, which targeted older D-Link HNAP GetDeviceSettings weaknesses (CVE-2015-2051, CVE-2019-10891, CVE-2022-37056, and CVE-2024-33112). The shared function name is an attribution trap: those campaigns concern different identifiers and command execution weaknesses, not this stack overflow.
References
- NVD: CVE-2026-138362
- CVE Record: CVE-2026-138362
- CVE API record (MITRE/CVE Awg)
- VulDB: CVE-2026-138362
- VulDB submission #1075854
- OffSeq Threat Radar: CVE-2026-138362
- Rapid7 Vulnerability Database: CVE-2026-138362
- Researcher repository (exploit reference)
- GitHub API: repository metadata
- GitHub API: repository contents
- PoC artifact: R18A1.zip
- D-Link advisory SAP10398 (earlier R18 remediation)
- R18 A1 firmware V1.20 release notes
- D-Link Security Advisories
- FTC: D-Link Agrees to Make Security Enhancements to Settle FTC Litigation
- FortiGuard Labs: Botnets Continue to Target Aging D-Link Vulnerabilities
- MITRE CWE-121: Stack-based Buffer Overflow



