Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. gogs.io/gogs
  4. ›
  5. CVE-2018-20303

CVE-2018-20303: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

May 14, 2022 (updated July 25, 2023)

In pkg/tool/path.go in Gogs before 0.11.82.1218, a directory traversal in the file-upload functionality can allow an attacker to create a file under data/sessions on the server, a similar issue to CVE-2018-18925.

References

  • github.com/advisories/GHSA-9hxg-w7qf-hh93
  • github.com/gogs/gogs/commit/ff93d9dbda5cebe90d86e4b7dfb2c6b8642970ce
  • github.com/gogs/gogs/issues/5558
  • nvd.nist.gov/vuln/detail/CVE-2018-20303
  • pentesterlab.com/exercises/cve-2018-18925/

Code Behaviors & Features

Detect and mitigate CVE-2018-20303 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.11.82.1218

Fixed versions

  • 0.11.82.1218

Solution

Upgrade to version 0.11.82.1218 or above.

Impact 7.5 HIGH

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/gogs.io/gogs/CVE-2018-20303.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:13 +0000.