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.
Published: 2026-03-31
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Data Compromise via SQL Injection
Action: Patch Immediately
AI Analysis

Impact

The KeyCache component of the SciTokens library constructs SQL statements by embedding user-supplied issuer and key_id values directly into the query string using Python's string formatting. This omission of parameterization permits an attacker to inject arbitrary SQL into the local SQLite database. The immediate consequence is that the attacker can read, modify, or delete token information stored by the library, thereby affecting authentication or authorization logic in any application that relies on these tokens. Although the weakness resides in the database layer and does not expose native code or system binaries, manipulation of token data can lead to denial of service or privilege escalation at the application level.

Affected Systems

All releases of SciTokens prior to version 1.9.6 contain the vulnerable KeyCache. Any deployment that uses the library to process externally supplied issuer or key_id values is at risk. The flaw exists regardless of the host operating system or overall software stack, provided a local SQLite database is employed. Updating to version 1.9.6 removes the missing parameterization and eliminates the injection surface.

Risk and Exploitability

The CVSS score of 9.8 classifies this flaw as critical, indicating a high potential impact if exploited. The EPSS score is below 1 %, suggesting that actual exploitation is not yet widespread, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The flaw can be triggered remotely by submitting a crafted issuer or key_id, requiring no special privileges on the host. Once invoked, an attacker can execute arbitrary SQL against the SQLite database, jeopardizing data confidentiality, integrity, and the authentication logic of dependent applications.

Generated by OpenCVE AI on April 3, 2026 at 22:31 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SciTokens to version 1.9.6 or later.
  • Verify that all code paths supplying issuer or key_id use the updated library.
  • If an upgrade cannot occur immediately, isolate the library from untrusted input and monitor for anomalous database activity.
  • Enforce strict input validation on issuer and key_id before they reach the library.

Generated by OpenCVE AI on April 3, 2026 at 22:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rh5m-2482-966c SciTokens is vulnerable to SQL Injection in KeyCache
History

Fri, 03 Apr 2026 19:00:00 +0000

Type Values Removed Values Added
First Time appeared Scitokens scitokens Library
CPEs cpe:2.3:a:scitokens:scitokens_library:*:*:*:*:*:*:*:*
Vendors & Products Scitokens scitokens Library

Wed, 01 Apr 2026 02:15:00 +0000

Type Values Removed Values Added
First Time appeared Scitokens
Scitokens scitokens
Vendors & Products Scitokens
Scitokens scitokens

Tue, 31 Mar 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 31 Mar 2026 03:00:00 +0000

Type Values Removed Values Added
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.
Title SciTokens vulnerable to SQL Injection in KeyCache
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Scitokens Scitokens Scitokens Library
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-31T13:58:33.774Z

Reserved: 2026-03-13T14:33:42.824Z

Link: CVE-2026-32714

cve-icon Vulnrichment

Updated: 2026-03-31T13:58:24.527Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-31T03:15:55.970

Modified: 2026-04-03T18:01:22.027

Link: CVE-2026-32714

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-07T08:08:16Z

Weaknesses