CVE-2021-23357 Details
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.
A directory traversal vulnerability has been identified in all versions of the Tyk Gateway API package, specifically within the handleAddOrUpdateApi function. This vulnerability allows users to delete arbitrary JSON files on the disk where Tyk is running, through the management API. The issue arises because the APIID, provided by the user, is used to create a file on disk. If a file with the same name already exists, it is deleted and replaced with the contents of the API creation request. As a result, this vulnerability not only allows file deletion but also modification of any JSON file on the Tyk host.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/TykTechnologies/tyk/issues/3390 | CVE | ExploitThird Party Advisory |
| https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMTYKTECHNOLOGIESTYKGATEWAY-1078516 | CVE | Third Party Advisory |
| https://github.com/TykTechnologies/tyk/issues/3390 | [email protected] | ExploitThird Party Advisory |
| https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMTYKTECHNOLOGIESTYKGATEWAY-1078516 | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| tyk tyk | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Mar 18, 2021 | Initial Analysis | [email protected] |