# CVE-2026-3227: Authenticated Command Injection on TP-Link TL-WR802N, TL-WR841N and TL-WR840N

> Authenticated attackers can execute arbitrary OS commands with root privileges via a crafted configuration file, leading to full device compromise.

- **Severity:** High 8.5 (`CVSS:4.0/AV:A/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 13 Mar 2026
- **Updated:** 1 Jul 2026
- **Also known as:** GHSA-7vvh-gmhq-282v

## What is CVE-2026-3227?

CVE-2026-3227 is a high-severity command injection vulnerability in TP Link Systems Inc. TL-WR802N v4, published on 13 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A command injection vulnerability was identified in TP-Link TL-WR802N v4, TL-WR841N v14, and TL-WR840N v6 due to improper neutralization of special elements used in an OS command.  In the router configuration import function allows an authenticated attacker to upload a crafted configuration file that results in execution of OS commands with root privileges during port-trigger processing.  
Successful exploitation allows an authenticated attacker to execute system commands with root privileges, leading to full device compromise.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-3227?

It affects 3 products.


Products: Tp-Link Tl-Wr802n Firmware, Tp-Link Tl-Wr840n Firmware, Tp-Link Tl-Wr841n Firmware.

## How do I fix CVE-2026-3227?

No fix has been published for CVE-2026-3227 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-3227 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-3227 exists.

Public exploit code:

- https://github.com/do4choo/CVE-2026-3227-TP-Link-authenticated-RCE (github_poc): https://github.com/do4choo/CVE-2026-3227-TP-Link-authenticated-RCE

## Other vulnerabilities in TP Link Systems Inc. TL-WR802N v4

- [CVE-2023-36489](https://insights.sbomify.com/CVE-2023-36489/): Command injection in TL-WR802N (high 8.8)
- [CVE-2021-4144](https://insights.sbomify.com/CVE-2021-4144/): Command injection in TL-WR802N V4(JP) (high 8.8)
- [CVE-2021-29302](https://insights.sbomify.com/CVE-2021-29302/): Memory corruption in n/a (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-3227 and fix it if it is affected.

What it is: CVE-2026-3227 is a high-severity command injection vulnerability in TP Link Systems Inc. TL-WR802N v4, published on 13 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-3227 exists.

Affected product: TP Link Systems Inc. TL-WR802N v4. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-3227/ (Markdown: https://insights.sbomify.com/CVE-2026-3227/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-3227
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-3227
- OSV: https://osv.dev/vulnerability/CVE-2026-3227

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-3227/
Summaries are generated and may contain mistakes; the official description above is the record.
