Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

489+ Articles
115+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-32714: Critical SQL Injection in SciTokens KeyCache (CVSS 9.8)
CVE-2026-32714: Critical SQL Injection in SciTokens KeyCache (CVSS 9.8)

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-32714

CVE-2026-32714: Critical SQL Injection in SciTokens KeyCache (CVSS 9.8)

A critical SQL injection vulnerability in the SciTokens Python library allows attackers to manipulate authentication token validation via unsanitized str.format() calls in the KeyCache class. All versions prior to 1.9.6 are affected. Immediate upgrade required.

Dylan H.

Security Team

March 31, 2026
5 min read

Affected Products

  • SciTokens Python library (all versions < 1.9.6)
  • Any application using SciTokens for token-based authentication

Executive Summary

A critical SQL injection vulnerability (CVE-2026-32714) has been disclosed in the SciTokens Python reference library, a widely used authentication token system for scientific computing platforms. The vulnerability carries a CVSS score of 9.8 (Critical) and stems from the use of Python's str.format() method to construct SQL queries with user-supplied input in the KeyCache class, enabling attackers to inject arbitrary SQL and compromise the authentication backend.

CVSS Score: 9.8 (Critical) CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

All SciTokens versions prior to 1.9.6 are affected. Maintainers have released a patch in version 1.9.6, and all users of the library should upgrade immediately.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-32714
CVSS Score9.8 (Critical)
TypeSQL Injection (CWE-89)
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
Confidentiality / Integrity / AvailabilityHigh / High / High
Published2026-03-31
Fixed inSciTokens v1.9.6

Affected Products

ProductAffected VersionsFixed Version
SciTokens Python libraryAll versions < 1.9.61.9.6

SciTokens is used across research computing and high-throughput scientific workflows, including HEP (High-Energy Physics), XSEDE/ACCESS infrastructure, and distributed computing frameworks that rely on capability-based authorization.


Technical Details

Root Cause

The vulnerability exists in the KeyCache class within the SciTokens library. The class is responsible for caching public keys used during token validation. When constructing SQL queries to look up or store cached key material, the code uses Python's str.format() method with user-controlled input:

# VULNERABLE pattern (prior to 1.9.6)
query = "SELECT * FROM key_cache WHERE issuer='{}' AND key_id='{}'".format(
    issuer, key_id
)
cursor.execute(query)

Both the issuer and key_id values are derived from the SciToken being validated — values that can be fully controlled by the token presenter. Because these values are interpolated directly into the SQL string without sanitization or parameterization, an attacker can craft a token with a malicious issuer or key_id claim to inject arbitrary SQL.

Exploitation Example

An attacker could craft a SciToken with an issuer value such as:

https://malicious.example.org'; DROP TABLE key_cache; --

Or extract sensitive data via UNION-based injection:

https://legit.example.org' UNION SELECT username, password, NULL FROM users --

Because the query is executed directly with the injected value, any SQL supported by the underlying database engine can be executed.

Why CVSS 9.8?

  • Network-accessible: SciTokens validation happens server-side when services verify incoming tokens from remote clients
  • No authentication required: The vulnerable code path executes during token validation — before authentication is confirmed
  • No user interaction: A fully automated exploit requires only the ability to present a crafted token to a validating service
  • Full C/I/A impact: SQL injection at the authentication layer can expose all cached key material, allow injection of malicious keys, and crash the key cache service

Impact Assessment

ImpactDescription
Authentication BypassInject malicious keys into key_cache to forge valid-looking tokens
Data ExfiltrationRead key material, cached data, and potentially other tables via UNION injection
Data ManipulationAlter or delete cached public keys, forcing validation failures
Database CorruptionDROP TABLE or destructive operations on the key cache backend
Lateral MovementIf the database contains broader data, SQL injection may expose sensitive credentials or configurations

Recommended Actions

1. Upgrade to SciTokens 1.9.6

# Upgrade using pip
pip install --upgrade scitokens
 
# Verify the version
pip show scitokens | grep Version
# Expected: Version: 1.9.6 or higher

2. Verify the Fix

Version 1.9.6 replaces str.format() string interpolation with parameterized queries (prepared statements), which are immune to SQL injection regardless of input content:

# FIXED pattern (v1.9.6+)
query = "SELECT * FROM key_cache WHERE issuer=? AND key_id=?"
cursor.execute(query, (issuer, key_id))

3. Check for Exploitation Signs

# Review application logs for anomalous issuer or key_id values
grep -i "issuer\|key_id" /var/log/scitokens.log | grep -E "'|--|UNION|SELECT|DROP"
 
# Check for unexpected database errors that may indicate failed injection attempts
grep -i "sqlite\|sql\|database error" /var/log/app.log | tail -100

4. Rotate Cached Key Material

If you suspect exploitation occurred, invalidate all cached token issuer keys and force re-fetch from issuer JWKS endpoints:

# Clear the key cache to force fresh key fetches
from scitokens.utils.keycache import KeyCache
cache = KeyCache.getinstance()
cache.clear()

Detection Indicators

IndicatorDescription
SQL syntax characters in token iss or kid claims', --, ;, UNION, SELECT
Database errors in SciTokens validation logsPossible failed injection attempts
Abnormally long issuer or key_id JWT claim valuesMay indicate injection payload delivery
Unexpected keys appearing in the key cache databaseMay indicate successful key injection

Remediation Checklist

  • Upgrade SciTokens to v1.9.6 on all affected hosts
  • Review application logs for signs of exploitation prior to patch
  • Clear and rebuild key cache after upgrade
  • Confirm parameterized queries are used in local patches or forks
  • Update dependency manifests and lock files (requirements.txt, pyproject.toml)
  • Run pip audit to check for any other vulnerable dependencies

References

  • NVD — CVE-2026-32714
  • SciTokens GitHub — Security Advisory
  • SciTokens v1.9.6 Release Notes
#CVE-2026-32714#SciTokens#SQL Injection#Python#Authentication#Critical

Related Articles

Critical Fortinet FortiClientEMS SQL Injection

Fortinet patches a CVSS 9.8 SQL injection in FortiClientEMS 7.4.4 allowing unauthenticated remote code execution. Endpoint management servers across...

3 min read

CVE-2026-4176: Perl Compress::Raw::Zlib Critical Vulnerability (CVSS 9.8)

Perl versions 5.9.4 through 5.43.8 ship a vulnerable Compress::Raw::Zlib core module that inherits CVE-2026-3381 from a vendored zlib dependency. CVSS 9.8 — upgrade Perl immediately.

5 min read

CVE-2016-20049: JAD Java Decompiler Stack-Based Buffer Overflow Enables Arbitrary Code Execution

JAD 1.5.8e-1kali1 and prior contains a critical stack-based buffer overflow vulnerability allowing attackers to execute arbitrary code by supplying input...

6 min read
Back to all Security Alerts