CVE-2017-1000420: Github.com/syncthing/syncthing Syncthing Vulnerable To Symlink Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-28xp-g7f6-7mhf
CVSS 7.5
CWE-59
Published
Advisory Summary

CVE-2017-1000420 is a HIGH (CVSS 7.5) syncthing vulnerable to symlink traversal vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/syncthing/syncthing libraries in the Go ecosystem. The issue involves syncthing vulnerable to symlink traversal and arbitrary file overwrite. Remediation is available in the latest vendor maintenance releases.

CVE-2017-1000420 at a Glance

CVE Identifier CVE-2017-1000420
GHSA Identifier GHSA-28xp-g7f6-7mhf
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Github.com/syncthing/syncthing
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.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

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

How to Fix CVE-2017-1000420

To remediate this vulnerability, upgrade all affected Github.com/syncthing/syncthing 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/syncthing/syncthing fixed: Latest secure release
Upgrade github.com/syncthing/syncthing to Latest secure release
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/syncthing/syncthing

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-1000420, inspect your project dependencies for Github.com/syncthing/syncthing:

inspect dependencies for github.com/syncthing/syncthing

Analyze the terminal output to locate any version of Github.com/syncthing/syncthing in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Github.com/syncthing/syncthing, 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

Syncthing version 0.14.33 and older erronously versions symlinks when they are deleted. If a directory is then created with the same name, a file created in that directory, and the file deleted, it is moved into the symlink target. This can lead to symlink traversal resulting in arbitrary file overwrite.

CVE-2017-1000420 Affected Github.com/syncthing/syncthing Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/syncthing/syncthing
Go
≤ 0.14.33

References

Frequently Asked Questions

What is CVE-2017-1000420?
CVE-2017-1000420 is a security vulnerability in Github.com/syncthing/syncthing involving Syncthing vulnerable to symlink traversal and arbitrary file overwrite under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Github.com/syncthing/syncthing versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/syncthing/syncthing.
What version fixes CVE-2017-1000420?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/syncthing/syncthing affected?
Yes, github.com/syncthing/syncthing is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2017-1000420?
CVE-2017-1000420 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2017-1000420?
CVE-2017-1000420 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check Go dependencies for CVE-2017-1000420?
Run the dependency tree command: 'inspect dependencies for github.com/syncthing/syncthing'. 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-28xp-g7f6-7mhf",
  "modified" : "2023-10-10T16:33:31Z",
  "published" : "2022-05-14T03:49:59Z",
  "aliases" : [ "CVE-2017-1000420" ],
  "summary" : "Syncthing vulnerable to symlink traversal and arbitrary file overwrite",
  "details" : "Syncthing version 0.14.33 and older erronously versions symlinks when they are deleted. If a directory is then created with the same name, a file created in that directory, and the file deleted, it is moved into the symlink target. This can lead to symlink traversal resulting in arbitrary file overwrite.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/syncthing/syncthing"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.14.33"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000420"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/syncthing/syncthing/issues/4286"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/syncthing/syncthing/commit/f1f21bf22020d9b881478c2e942ba6943c8da2f3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/syncthing/syncthing"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-26T22:17:40Z",
    "nvd_published_at" : "2018-01-02T19:29:00Z"
  }
}