D-Link DIR-3040 prog.cgi SetQuickVPNSettings PSK Stack-Based Buffer Overflow Remote Code Execution Vulnerability

MonitorFull system takeover with adjacent network access.
6.8MEDIUM

CVE-2023-41223

Key Information:

Vendor

D-link

Status
CVE ID
CVE ID:
CVE-2023-41223
Vendor
CVE Published:
3 May 2024

Timeline

  • Vulnerability published

  • Vulnerability Reserved

How risky is it?

  • No: Needs adjacent network access
  • No: No public exploit yet
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Monitor

Low risk for most. Patch in your normal cycle.

What to do

1Check the vendor's fix

No fixed version is recorded yet. The vendor advisory is the authoritative source for patches.

Read the vendor advisory ↗
2Why it's rated "Monitor"
  • Its CVSS severity is medium (6.8).

What is CVE-2023-41223?

The D-Link DIR-3040 routers are susceptible to a stack-based buffer overflow due to improper input validation in the prog.cgi binary. This vulnerability arises when handling HNAP requests via the lighttpd web server, specifically on TCP ports 80 and 443. By sending a specially crafted user-supplied string, an authenticated attacker can execute arbitrary code within the context of the root user. This poses a significant risk to network integrity, potentially allowing unauthorized access and control over the device. Network administrators are encouraged to review their configurations and apply any security patches provided by D-Link to mitigate this vulnerability.

Affected Version(s)

DIR-3040 120B03

References

Out-of-Bounds Write Vulnerability in D-Link DIR-895L Router

CVE-2026-100740
D-linkDir-895l👾9.4CRITICAL

Stack-Based Buffer Overflow in D-Link DIR-868L Authentication Component

CVE-2026-94089
D-linkDir-868l👾10CRITICAL

Stack-based Buffer Overflow in D-Link DI-8400 Router

CVE-2025-9938
D-linkDi-8400👾8.7HIGH
View more D-link vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities · Report a correction

CVSS V3.1

Score:
6.8
Severity:
MEDIUM
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Adjacent Network
Attack Complexity:
Low
Privileges Required:
High
User Interaction:
None
Scope:
Unchanged

CVSS V3.0

Score:
6.8
Severity:
MEDIUM
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Adjacent Network
Attack Complexity:
Low
Privileges Required:
High
User Interaction:
None
Scope:
Unchanged
.