Vulnerabilities in pkg:golang/github.com/btcsuite/go-socks

PACKAGE
Advisory Identifier: GHSA-gxgj-xjcw-fv9p
Advisory Summary

CVE-2013-10005 is a HIGH (CVSS 7.5) socks infinite loop vulnerability vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Github.com/btcsuite/go socks libraries in the Go ecosystem. The issue involves socks infinite loop vulnerability. Remediation is available by upgrading affected packages to version 0.0.0-20130808000456-233bccbb1abe.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/btcsuite/go-socks

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/btcsuite/go-socks. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gxgj-xjcw-fv9p CVE-2013-10005 HIGH socks Infinite Loop vulnerability

CVE-2013-10005 at a Glance

CVE Identifier CVE-2013-10005
GHSA Identifier GHSA-gxgj-xjcw-fv9p
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Github.com/btcsuite/go socks
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2013-10005

To remediate this vulnerability, upgrade all affected Github.com/btcsuite/go socks 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/btcsuite/go-socks fixed: 0.0.0-20130808000456-233bccbb1abe
Upgrade github.com/btcsuite/go-socks to 0.0.0-20130808000456-233bccbb1abe
github.com/btcsuitereleases/go-socks fixed: 0.0.0-20130808000456-233bccbb1abe
Upgrade github.com/btcsuitereleases/go-socks to 0.0.0-20130808000456-233bccbb1abe
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/btcsuite/go-socks

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-10005, inspect your project dependencies for Github.com/btcsuite/go socks:

inspect dependencies for github.com/btcsuite/go-socks

Analyze the terminal output to locate any version of Github.com/btcsuite/go socks in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20130808000456-233bccbb1abe), 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Github.com/btcsuite/go socks, 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

The `RemoteAddr` and `LocalAddr` methods on the returned `net.Conn` may call themselves, leading to an infinite loop which will crash the program due to a stack overflow.

CVE-2013-10005 Affected Github.com/btcsuite/go socks Versions

2 component(s)
Fixed Versions:
0.0.0-20130808000456-233bccbb1abe
Product / Package Ecosystem Affected Versions Fixed Version
github.com/btcsuite/go-socks
Go
< 0.0.0-20130808000456-233bccbb1abe
0.0.0-20130808000456-233bccbb1abe
github.com/btcsuitereleases/go-socks
Go
< 0.0.0-20130808000456-233bccbb1abe
0.0.0-20130808000456-233bccbb1abe

References

Frequently Asked Questions

What is CVE-2013-10005?
CVE-2013-10005 is a security vulnerability in Github.com/btcsuite/go socks involving socks Infinite Loop vulnerability under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Github.com/btcsuite/go socks versions are affected?
Affected versions include releases prior to 0.0.0-20130808000456-233bccbb1abe across affected packages: github.com/btcsuite/go-socks, github.com/btcsuitereleases/go-socks.
What version fixes CVE-2013-10005?
Upgrading to 0.0.0-20130808000456-233bccbb1abe (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/btcsuite/go-socks affected?
Yes, github.com/btcsuite/go-socks is affected in releases prior to 0.0.0-20130808000456-233bccbb1abe. Upgrade your dependency to 0.0.0-20130808000456-233bccbb1abe or later.
Is github.com/btcsuitereleases/go-socks affected?
Yes, github.com/btcsuitereleases/go-socks is affected in releases prior to 0.0.0-20130808000456-233bccbb1abe. Upgrade your dependency to 0.0.0-20130808000456-233bccbb1abe or later.
What is the CVSS score of CVE-2013-10005?
CVE-2013-10005 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2013-10005?
CVE-2013-10005 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Go dependencies for CVE-2013-10005?
Run the dependency tree command: 'inspect dependencies for github.com/btcsuite/go-socks'. 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-gxgj-xjcw-fv9p",
  "modified" : "2023-01-09T21:48:38Z",
  "published" : "2022-12-28T00:30:23Z",
  "aliases" : [ "CVE-2013-10005" ],
  "summary" : "socks Infinite Loop vulnerability",
  "details" : "The `RemoteAddr` and `LocalAddr` methods on the returned `net.Conn` may call themselves, leading to an infinite loop which will crash the program due to a stack overflow.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/btcsuite/go-socks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20130808000456-233bccbb1abe"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/btcsuitereleases/go-socks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20130808000456-233bccbb1abe"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-10005"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/btcsuite/go-socks/commit/233bccbb1abe02f05750f7ace66f5bffdb13defc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/btcsuite/go-socks"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2020-0024"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-09T21:48:38Z",
    "nvd_published_at" : "2022-12-27T22:15:00Z"
  }
}