# CVE-2023-43644: Improper authentication in the SOCKS5 inbound in sing-box

> Attackers can bypass authentication in sing-box SOCKS5 inbounds via crafted requests, requiring updates or restricted exposure.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Sep 2023
- **Updated:** 24 Sep 2024
- **Also known as:** GHSA-r5hm-mp3j-285g, GO-2023-2077

## What is CVE-2023-43644?

CVE-2023-43644 is a critical authentication bypass vulnerability in SagerNet sing-box, published on 25 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Sing-box is an open source proxy system. Affected versions are subject to an authentication bypass when specially crafted requests are sent to sing-box. This affects all SOCKS5 inbounds with user authentication and an attacker may be able to bypass authentication. Users are advised to update to sing-box 1.4.4 or to 1.5.0-rc.4. Users unable to update should not expose the SOCKS5 inbound to insecure environments.

Weakness: CWE-306 (Missing Authentication for Critical Functionality)

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

7 open source packages ship an affected version, including github.com/sagernet/sing-box and github.com/sagernet/sing. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/sagernet/sing-box` | Go | All versions | 1.4.5 |
| `github.com/sagernet/sing-box` | Go | All versions | 1.4.5 |
| `github.com/sagernet/sing-box` | Go | From 1.5.0-beta.1 | 1.5.0-rc.5 |
| `github.com/sagernet/sing-box` | Go | From 1.5.0-beta.1 | 1.5.0-rc.5 |
| `github.com/sagernet/sing` | Go | All versions | 0.2.12-0.20230925092853-5b05b5c147d9 |
| `github.com/sagernet/sing` | Go | All versions | 0.2.12-0.20230925092853-5b05b5c147d9 |
| `github.com/sagernet/sing` | Go | All versions | 0.2.12-0.20230925092853-5b05b5c147d9 |

Products: Sagernet Sing-Box.

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

Upgrade github.com/sagernet/sing-box to a fixed version for your release line: 1.4.5 or 1.5.0-rc.5.

## Is CVE-2023-43644 being exploited?

There is no known exploitation of CVE-2023-43644 in the wild and no public exploit code.

## Fix prompt for AI coding agents

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

What it is: CVE-2023-43644 is a critical authentication bypass vulnerability in SagerNet sing-box, published on 25 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-43644 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/sagernet/sing-box (Go): affected all versions; fixed in 1.4.5
- github.com/sagernet/sing-box (Go): affected all versions; fixed in 1.4.5
- github.com/sagernet/sing-box (Go): affected from 1.5.0-beta.1; fixed in 1.5.0-rc.5
- github.com/sagernet/sing-box (Go): affected from 1.5.0-beta.1; fixed in 1.5.0-rc.5
- github.com/sagernet/sing (Go): affected all versions; fixed in 0.2.12-0.20230925092853-5b05b5c147d9
- github.com/sagernet/sing (Go): affected all versions; fixed in 0.2.12-0.20230925092853-5b05b5c147d9
- github.com/sagernet/sing (Go): affected all versions; fixed in 0.2.12-0.20230925092853-5b05b5c147d9

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-43644/ (Markdown: https://insights.sbomify.com/CVE-2023-43644/index.md)
```

## Sources

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

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