🇰🇷 한글 설명
사용자 입력값이 적절한 검증 없이 서버 응답에 그대로 반영되어 발생하는 교차 사이트 스크립팅(XSS) 취약점입니다. 공격자는 이를 통해 다른 사용자의 세션에서 임의의 자바스크립트를 실행하여 세션 하이재킹이나 정보 탈취를 수행할 수 있습니다.
💡 쉬운 설명
웹사이트의 특정 입력창에 악성 코드를 넣었을 때, 이 코드가 필터링되지 않고 다른 사용자에게 그대로 실행되는 문제입니다. 이를 통해 해커가 사용자의 로그인 정보를 훔치거나 계정을 마음대로 조작할 수 있습니다.
🇺🇸 원문 (English)
SummaryA Cross-Site Scripting (XSS) vulnerability allows an attacker to execute arbitrary JavaScript in the context of another user’s session. This occurs because user-supplied input is reflected back in the server’s response without proper sanitization or escaping, potentially enabling malicious actions such as session hijacking, credential theft, or unauthorized actions in the application.
DetailsThe vulnerability resides in the “Tags” input field on the /s/ajax?action=lead:addLeadTags endpoint. Although the server applies sanitization before storing the data or returning it later, the payload is executed immediately in the victim’s browser upon reflection, allowing an attacker to run arbitrary JavaScript in the user’s session.
ImpactA Reflected XSS attack can have a significant impact, allowing attackers to steal sensitive user data like cookies, redirect users to malicious websites, manipulate the web page content, and essentially take control of a user's session within an application by executing malicious JavaScript code within the victim's browser, even if the server-side code is secure; essentially enabling them to perform actions as if they were the logged-in user.
References * Web Security Academy: Cross-site scripting https://portswigger.net/web-security/cross-site-scripting
* Web Security Academy: Reflected cross-site scripting https://portswigger.net/web-security/cross-site-scripting/reflected
📍 영향받는 시스템
/s/ajax?action=lead:addLeadTags 엔드포인트의 'Tags' 입력 필드
⚔️ 공격 벡터
악성 스크립트가 포함된 요청을 통해 사용자의 브라우저에서 코드가 즉시 실행되도록 유도하는 Reflected XSS 공격
🛡️ 대응 방법
사용자 입력값에 대한 엄격한 입력값 검증(Input Validation) 및 출력 시 적절한 HTML 엔티티 이스케이프(Output Escaping) 적용
🔧 검증 코드
명령어 실행 결과 'VULNERABLE'이 출력되면 입력한 스크립트가 필터링 없이 그대로 반환되어 취약함을 의미합니다.
curl -s -X POST 'https://[TARGET_URL]/s/ajax?action=lead:addLeadTags' -d 'tags=<script>alert(1)</script>' | grep -q '<script>alert(1)</script>' && echo 'VULNERABLE' || echo 'NOT VULNERABLE'
💻 영향받는 소프트웨어
IBM WebSphere Application Server