CVE-2018-19986

CVE-2018-19986 is a critical-severity vulnerability in D-link Dir-818lw Firmware with a CVSS 3.x base score of 9.8. Its EPSS exploit-prediction score of 42% places it in the 99th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-78.

Key facts

Description

In the /HNAP1/SetRouterSettings message, the RemotePort parameter is vulnerable, and the vulnerability affects D-Link DIR-818LW Rev.A 2.05.B03 and DIR-822 B1 202KRb06 devices. In the SetRouterSettings.php source code, the RemotePort parameter is saved in the $path_inf_wan1."/web" internal configuration memory without any regex checking. And in the IPTWAN_build_command function of the iptwan.php source code, the data in $path_inf_wan1."/web" is used with the iptables command without any regex checking. A vulnerable /HNAP1/SetRouterSettings XML message could have shell metacharacters in the RemotePort element such as the `telnetd` string.

Frequently asked questions

What is CVE-2018-19986?
In the /HNAP1/SetRouterSettings message, the RemotePort parameter is vulnerable, and the vulnerability affects D-Link DIR-818LW Rev.A 2.05.B03 and DIR-822 B1 202KRb06 devices. In the SetRouterSettings.php source code, the RemotePort parameter is saved in the $path_inf_wan1."/web" internal configuration memory without any regex checking. And in the IPTWAN_build_command function of the iptwan.php source code, the data in $path_inf_wan1."/web" is used with the iptables command without any regex checking. A vulnerable /HNAP1/SetRouterSettings XML message could have shell metacharacters in the RemotePort element such as the `telnetd` string.
How severe is CVE-2018-19986?
CVE-2018-19986 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2018-19986 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 42% (99th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2018-19986?
CVE-2018-19986 primarily affects D-link Dir-818lw Firmware. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2018-19986?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
When was CVE-2018-19986 published?
CVE-2018-19986 was published on 2019-05-13 and last updated on 2026-06-17.

References

Affected products (2)

More vulnerabilities in D-link Dir-818lw Firmware

All CVEs affecting D-link Dir-818lw Firmware →

Other CWE-78 (OS Command Injection) vulnerabilities

Browse all CWE-78 (OS Command Injection) vulnerabilities →