Vulnerabilities in pkg:golang/github.com/sagernet/sing

PACKAGE
Advisory Identifier: GHSA-r5hm-mp3j-285g
Advisory Summary

CVE-2023-43644 is a CRITICAL (CVSS 9.1) sing-box vulnerable to improper authentication vulnerability (CWE-306: Missing Authentication for Critical Function) affecting Github.com/sagernet/sing box libraries in the Go ecosystem. The issue involves sing-box vulnerable to improper authentication in the socks inbound. Remediation is available by upgrading affected packages to version 1.4.5, 1.5.0-rc.5, 0.2.12-0.20230925092853-5b05b5c147d9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/sagernet/sing

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/sagernet/sing. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-r5hm-mp3j-285g CVE-2023-43644 CRITICAL sing-box vulnerable to improper authentication in the SOCKS inbound

CVE-2023-43644 at a Glance

CVE Identifier CVE-2023-43644
GHSA Identifier GHSA-r5hm-mp3j-285g
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product Github.com/sagernet/sing box
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-43644

To remediate this vulnerability, upgrade all affected Github.com/sagernet/sing box dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/sagernet/sing-box fixed: 1.4.5
Upgrade github.com/sagernet/sing-box to 1.4.5
github.com/sagernet/sing-box fixed: 1.5.0-rc.5
Upgrade github.com/sagernet/sing-box to 1.5.0-rc.5
github.com/sagernet/sing fixed: 0.2.12-0.20230925092853-5b05b5c147d9
Upgrade github.com/sagernet/sing to 0.2.12-0.20230925092853-5b05b5c147d9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/sagernet/sing-box

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-43644, inspect your project dependencies for Github.com/sagernet/sing box:

inspect dependencies for github.com/sagernet/sing-box

Analyze the terminal output to locate any version of Github.com/sagernet/sing box in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In Github.com/sagernet/sing box, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact This vulnerability allows specially crafted requests to bypass authentication, affecting all SOCKS inbounds with user authentication. ### Patches Update to sing-box 1.4.5 or 1.5.0-rc.5 and later versions. ### Workarounds Don't expose the SOCKS5 inbound to insecure environments.

CVE-2023-43644 Affected Github.com/sagernet/sing box Versions

3 component(s)
Fixed Versions:
1.4.51.5.0-rc.50.2.12-0.20230925092853-5b05b5c147d9
Product / Package Ecosystem Affected Versions Fixed Version
github.com/sagernet/sing-box
Go
< 1.4.5
1.4.5
github.com/sagernet/sing-box
Go
≥ 1.5.0-beta.1
< 1.5.0-rc.5
1.5.0-rc.5
github.com/sagernet/sing
Go
< 0.2.12-0.20230925092853-5b05b5c147d9
0.2.12-0.20230925092853-5b05b5c147d9

References

Frequently Asked Questions

What is CVE-2023-43644?
CVE-2023-43644 is a security vulnerability in Github.com/sagernet/sing box involving sing-box vulnerable to improper authentication in the SOCKS inbound under CWE-306: Missing Authentication for Critical Function.
Which Github.com/sagernet/sing box versions are affected?
Affected versions include releases prior to 1.4.5, 1.5.0-rc.5, 0.2.12-0.20230925092853-5b05b5c147d9 across affected packages: github.com/sagernet/sing-box, github.com/sagernet/sing.
What version fixes CVE-2023-43644?
Upgrading to 1.4.5, 1.5.0-rc.5, 0.2.12-0.20230925092853-5b05b5c147d9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/sagernet/sing-box affected?
Yes, github.com/sagernet/sing-box is affected in releases prior to 1.4.5, 1.5.0-rc.5. Upgrade your dependency to 1.4.5, 1.5.0-rc.5 or later.
Is github.com/sagernet/sing affected?
Yes, github.com/sagernet/sing is affected in releases prior to 0.2.12-0.20230925092853-5b05b5c147d9. Upgrade your dependency to 0.2.12-0.20230925092853-5b05b5c147d9 or later.
What is the CVSS score of CVE-2023-43644?
CVE-2023-43644 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H.
What CWE is associated with CVE-2023-43644?
CVE-2023-43644 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check Go dependencies for CVE-2023-43644?
Run the dependency tree command: 'inspect dependencies for github.com/sagernet/sing-box'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r5hm-mp3j-285g",
  "modified" : "2023-09-26T19:35:39Z",
  "published" : "2023-09-26T19:35:39Z",
  "aliases" : [ "CVE-2023-43644" ],
  "summary" : "sing-box vulnerable to improper authentication in the SOCKS inbound",
  "details" : "### Impact\n\nThis vulnerability allows specially crafted requests to bypass authentication, affecting all SOCKS inbounds with user authentication.\n\n### Patches\n\nUpdate to sing-box 1.4.5 or 1.5.0-rc.5 and later versions.\n\n### Workarounds\n\nDon't expose the SOCKS5 inbound to insecure environments.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sagernet/sing-box"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sagernet/sing-box"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0-beta.1"
      }, {
        "fixed" : "1.5.0-rc.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sagernet/sing"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.12-0.20230925092853-5b05b5c147d9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SagerNet/sing-box/security/advisories/GHSA-r5hm-mp3j-285g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-43644"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SagerNet/sing-box/commit/9891fd672f5da9f20f59a1693271a946727f49e2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SagerNet/sing/commit/5b05b5c147d9650e8accb4441e216c72a61f4859"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SagerNet/sing-box"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SagerNet/sing-box/releases/tag/v1.4.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-26T19:35:39Z",
    "nvd_published_at" : "2023-09-25T20:15:11Z"
  }
}