CVE-2020-26283: Github.com/ipfs/go ipfs Control Character Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-r4gv-vj59-cccm
CVSS 6.8
CWE-116 CWE-150
Published
Advisory Summary

CVE-2020-26283 is a MODERATE (CVSS 6.8) control character injection vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Github.com/ipfs/go ipfs libraries in the Go ecosystem. The issue involves control character injection in console output in github.com/ipfs/go-ipfs. Remediation is available by upgrading affected packages to version 0.8.0.

CVE-2020-26283 at a Glance

CVE Identifier CVE-2020-26283
GHSA Identifier GHSA-r4gv-vj59-cccm
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Github.com/ipfs/go ipfs
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.8

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

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

How to Fix CVE-2020-26283

To remediate this vulnerability, upgrade all affected Github.com/ipfs/go ipfs 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/ipfs/go-ipfs fixed: 0.8.0
Upgrade github.com/ipfs/go-ipfs to 0.8.0
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/ipfs/go-ipfs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-26283, inspect your project dependencies for Github.com/ipfs/go ipfs:

inspect dependencies for github.com/ipfs/go-ipfs

Analyze the terminal output to locate any version of Github.com/ipfs/go ipfs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.0), 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Github.com/ipfs/go ipfs, 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 Control characters are not escaped from console output. This can result in hiding input from the user which could result in the user taking an unknown, malicious action. ### Patches <!-- _Has the problem been patched? What versions should users upgrade to?_ --> - Patched via https://github.com/ipfs/go-ipfs/pull/7831 in v0.8.0 ### For more information If you have any questions or comments about this advisory: * Open an issue in [go-ipfs](http://github.com/ipfs/go-ipfs) * Email us at [security@ipfs.io](mailto:security@ipfs.io)

CVE-2020-26283 Affected Github.com/ipfs/go ipfs Versions

1 component(s)
Fixed Versions:
0.8.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/ipfs/go-ipfs
Go
< 0.8.0
0.8.0

References

Frequently Asked Questions

What is CVE-2020-26283?
CVE-2020-26283 is a security vulnerability in Github.com/ipfs/go ipfs involving Control character injection in console output in github.com/ipfs/go-ipfs under CWE-116: Improper Encoding or Escaping of Output.
Which Github.com/ipfs/go ipfs versions are affected?
Affected versions include releases prior to 0.8.0 across affected packages: github.com/ipfs/go-ipfs.
What version fixes CVE-2020-26283?
Upgrading to 0.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/ipfs/go-ipfs affected?
Yes, github.com/ipfs/go-ipfs is affected in releases prior to 0.8.0. Upgrade your dependency to 0.8.0 or later.
What is the CVSS score of CVE-2020-26283?
CVE-2020-26283 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2020-26283?
CVE-2020-26283 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check Go dependencies for CVE-2020-26283?
Run the dependency tree command: 'inspect dependencies for github.com/ipfs/go-ipfs'. 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-r4gv-vj59-cccm",
  "modified" : "2021-05-21T18:06:39Z",
  "published" : "2021-06-23T17:27:27Z",
  "aliases" : [ "CVE-2020-26283" ],
  "summary" : "Control character injection in console output in github.com/ipfs/go-ipfs ",
  "details" : "### Impact\nControl characters are not escaped from console output. This can result in hiding input from the user which could result in the user taking an unknown, malicious action.\n\n### Patches\n<!-- _Has the problem been patched? What versions should users upgrade to?_  -->\n\n- Patched via https://github.com/ipfs/go-ipfs/pull/7831 in v0.8.0\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [go-ipfs](http://github.com/ipfs/go-ipfs)\n* Email us at [security@ipfs.io](mailto:security@ipfs.io)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/ipfs/go-ipfs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ipfs/go-ipfs/security/advisories/GHSA-r4gv-vj59-cccm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26283"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ipfs/go-ipfs/pull/7831"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ipfs/go-ipfs/commit/fb0a9acd2d8288bd1028c3219a420de62a09683a"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-150" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T18:06:39Z",
    "nvd_published_at" : null
  }
}