# CVE-2023-1389: TP-Link Archer AX-21 Command Injection

> Unauthenticated attackers can execute arbitrary commands as root on TP-Link Archer AX21 routers via the web interface.

- **Severity:** High 8.8 (`CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 1 May 2023 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 15 Mar 2023
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-h49r-m2rg-6pgf

## What is CVE-2023-1389?

CVE-2023-1389 is a high-severity command injection vulnerability in TP-Link Archer AX21 (AX1800), published on 15 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

TP-Link Archer AX21 (AX1800) firmware versions before 1.1.4 Build 20230219 contained a command injection vulnerability in the country form of the /cgi-bin/luci;stok=/locale endpoint on the web management interface. Specifically, the country parameter of the write operation was not sanitized before being used in a call to popen(), allowing an unauthenticated attacker to inject commands, which would be run as root, with a simple POST request.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2023-1389?

It affects 1 product.


Products: Tp-Link Archer Ax21 Firmware.

## How do I fix CVE-2023-1389?

No fix has been published for CVE-2023-1389 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 22 May 2023.

## Is CVE-2023-1389 being exploited?

Yes. Attackers have exploited CVE-2023-1389 in the wild since at least 1 May 2023.

Public exploit code:

- https://github.com/Voyag3r-Security/CVE-2023-1389 (github_poc): https://github.com/Voyag3r-Security/CVE-2023-1389
- TP-Link Archer AX21 - Unauthenticated Command Injection [Loader] (github_poc): https://github.com/werwolfz/CVE-2023-1389
- TP-Link Archer AX21 - Unauthenticated Command Injection (exploitdb)
- TP-Link Archer AX21 (AX1800) - Unauthenticated Command Injection (nuclei): http/cves/2023/CVE-2023-1389.yaml

## Other vulnerabilities in TP-Link Archer AX21 (AX1800)

- [CVE-2023-27359](https://insights.sbomify.com/CVE-2023-27359/): TP-Link AX1800 hotplugd Firewall Rule Race Condition Vulnerability (critical 9.8)
- [CVE-2023-31710](https://insights.sbomify.com/CVE-2023-31710/): Memory corruption in n/a (critical 9.8)
- [CVE-2023-27332](https://insights.sbomify.com/CVE-2023-27332/): TP-Link Archer AX21 tdpServer Logging Stack-based Buffer Overflow Remote Code Execution Vulnerability (high 8.8)
- [CVE-2023-27346](https://insights.sbomify.com/CVE-2023-27346/): TP-Link AX1800 Firmware Parsing Stack-based Buffer Overflow Remote Code Execution Vulnerability (high 8.8)
- [CVE-2023-27333](https://insights.sbomify.com/CVE-2023-27333/): TP-Link Archer AX21 tmpServer Command 0x422 Stack-based Buffer Overflow Remote Code Execution Vulnerability (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-1389 and fix it if it is affected.

What it is: CVE-2023-1389 is a high-severity command injection vulnerability in TP-Link Archer AX21 (AX1800), published on 15 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2023-1389 in the wild since at least 1 May 2023.

Affected product: TP-Link Archer AX21 (AX1800). 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-2023-1389/ (Markdown: https://insights.sbomify.com/CVE-2023-1389/index.md)
```

## Sources

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

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