Skip to content
WatchlistCritical

CVE-2018-19986Dir-818lw Firmware OS Command Injection

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.

Published May 13, 2019 · Updated Nov 21, 2024

Key Facts

Patch immediately
  • CVE-2018-19986 is a critical-severity vulnerability (CVSS 9.8 v3) affecting Dir-818lw Firmware (D-Link), Dir-822 Firmware (D-Link).
  • It is exploited in the wild, listed in Industry KEV feed since Apr 12, 2021. No public exploit code is known.
  • EPSS estimates a 42% probability of exploitation in the next 30 days.
  • No fixed version is listed yet; check the vendor advisory for mitigations.
  • Brandefense priority: patch immediately, because it is listed as exploited in the wild.

Scores

CVSS v3

9.8

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS (30-day exploit likelihood)

42%

Higher than 98.6% of all scored CVEs

Exploit maturity

Proof of concept

ATLAS score

38/100

Publication score, see How it works

Exploitation Verdict

KEV listed

Apr 12, 2021

Federal due date

None

No federal due date

Ransomware use

Not reported

Attributed actors

None named

Exploit & Defence Guidance

Exploit maturity

Proof of concept

Public exploit code

1

Proof-of-concept links

In-the-wild evidence

1

Reports of active use

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.

Known-Exploited Catalog Listings

CatalogAddedRemediation dueRansomware use
Industry KEV feedApr 12, 2021n/aNot reported

Affected Products

2 affected entries in total
ProductAffected versionsFixed in
Dir-818lw FirmwareD-Link2.05.b03n/a
Dir-822 FirmwareD-Link202krb06n/a

Timeline

  1. Publicly disclosed

    May 13, 2019

  2. Added to Industry KEV feed

    Apr 12, 2021

  3. Last updated

    Nov 21, 2024

Weakness Type

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

FAQ

Common Questions.

Is CVE-2018-19986 On Your Attack Surface?

Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.

Request A Demo

Figures as of Oct 19, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.