...
Code Block | ||
---|---|---|
| ||
// String s may be user controllable // \uFE64 is normalized to << and \uFE64 is normalized to >> using KFKC String s = ""\uFE64"" + "script""script" + ""\uFE65""; //validate Pattern pattern = Pattern.compile("[<>]""[<>]"); // check for angle brackets Matcher matcher = pattern.matcher(s); if(matcher.find()) { System.out.println(""found black listed tag""); } else { // ... } // normalize s = Normalizer.normalize(s, Form.NFKC); |
...
Code Block | ||
---|---|---|
| ||
String s = ""\uFE64"" + "script""script" + ""\uFE65""; // normalize s = Normalizer.normalize(s, Form.NFKC); //validate Pattern pattern = Pattern.compile("[<>]""[<>]"); Matcher matcher = pattern.matcher(s); if(matcher.find()) { System.out.println(""found black listed tag""); throw new IllegalStateException(); } else { // ... } |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MSC41 IDS10- J | high | probable | medium | P12 | L1 |
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
References
Wiki Markup |
---|
\[[API 06|AA. Java References#API 06]\] \[[Unicode 08|AA. Java References#Unicode 08]\] \[[Weber 09|AA. Java References#Weber 09]\] \[[MITRE 09|AA. Java References#MITRE 09]\] [CWE ID 289|http://cwe.mitre.org/data/definitions/289.html] ""Authentication Bypass by Alternate Name"" and [CWE ID 180|http://cwe.mitre.org/data/definitions/289.html] ""Incorrect Behavior Order: Validate Before Canonicalize"" |
...
IDS09-J. Account for supplementary and combining characters in globalized code 49. Miscellaneous (MSC) 99. The Void (VOID)