취약점 도입 방식
Implementation
적용 가능한 플랫폼
언어
클래스: Not Language-Specific (Undetermined)
기술
클래스: Web Based (Undetermined)
이름: Web Server (Undetermined)
일반적인 결과
| 범위 |
영향 |
가능성 |
Confidentiality Integrity Availability | Read Application Data, Execute Unauthorized Code or Commands | |
관찰된 예시
| 참고 자료 |
설명 |
| XSS using " |
| Encoded "javascript" in IMG tag. |
| Extra "<" in front of SCRIPT tag. |
잠재적 완화 방법
Phases : Implementation
Resolve all filtered input to absolute or canonical representations before processing.
Phases : Implementation
Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including tag attributes, hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
Phases : Implementation
Phases : Implementation
With Struts, write all data from form beans with the bean's filter attribute set to true.
Phases : Implementation
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
취약점 매핑 메모
근거 : This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
댓글 : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
관련 공격 패턴
| CAPEC ID |
공격 패턴 이름 |
| CAPEC-245 |
XSS Using Doubled Characters
The adversary bypasses input validation by using doubled characters in order to perform a cross-site scripting attack. Some filters fail to recognize dangerous sequences if they are preceded by repeated characters. For example, by doubling the < before a script command, (<
|