From 60dcd8bbb0b52aa7e2c00324c576e76ff6c5f302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 17:15:33 +0100 Subject: [PATCH] Fix for --jwt not able to confirm weaknesses when invalid tokens are answered with HTTP 401/403 --- lib/core/settings.py | 2 +- lib/techniques/jwt/inject.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 2928aac7e..cf0512ca5 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.11.64" +VERSION = "1.10.11.65" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/techniques/jwt/inject.py b/lib/techniques/jwt/inject.py index df6bdf704..495c3735e 100644 --- a/lib/techniques/jwt/inject.py +++ b/lib/techniques/jwt/inject.py @@ -85,6 +85,10 @@ def _send(token): skipUrlEncode = conf.skipUrlEncode conf.skipUrlEncode = True + # Note: a rejected token is commonly answered with HTTP 401/403 - that is an oracle answer here, not a connection problem + ignoreCode = conf.ignoreCode + conf.ignoreCode = list(set((ignoreCode or []) + [401, 403])) + if conf.delay: time.sleep(conf.delay) @@ -110,6 +114,7 @@ def _send(token): return None finally: conf.skipUrlEncode = skipUrlEncode + conf.ignoreCode = ignoreCode return page