{"record":{"id":"f62f48443f644734","repo":"peass-ng/PEASS-ng","slug":"charcorde-over-0xffff-is-not-supported","errorCode":null,"errorMessage":"Charcorde over 0xffff is not supported","messagePattern":"Charcorde over 0xffff is not supported","errorType":"exception","errorClass":"FormatException","httpStatus":null,"severity":"error","filePath":"winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/UriEncoding.cs","lineNumber":138,"sourceCode":"                    p += 3;\n                    result.Append((char)c0);\n                    continue;\n                }\n                var c1 = ( HexToInt(s[p + 4]) << 4 ) + HexToInt(s[p + 5]);\n                if ( c0 < 0xe0 ) {\n                    p += 6;\n                    var c = (char)( ( ( c0 & 0x1f ) << 6 ) + ( c1 & 0x7f ) );\n                    result.Append(c);\n                    continue;\n                }\n                var c2 = ( HexToInt(s[p + 7]) << 4 ) + HexToInt(s[p + 8]);\n                if ( c0 < 0xf1 ) {\n                    p += 9;\n                    var c = (char)( ( ( c0 & 0x0f ) << 12 ) + ( ( c1 & 0x7f ) << 6 ) + ( c2 & 0x7f ) );\n                    result.Append(c);\n                    continue;\n                }\n                throw new FormatException(\"Charcorde over 0xffff is not supported\");\n            }\n            return result.Append(s.Substring(p)).ToString();\n        }\n        static int HexToInt(char c)\n        {\n            return c <= '9' ? c - '0' : c < 'Z' ? c - 'A' + 10 : c - 'a' + 10;\n\n        }\n    }\n\n}\n","sourceCodeStart":120,"sourceCodeEnd":150,"githubUrl":"https://github.com/peass-ng/PEASS-ng/blob/53fb989abc2219826385683a6fee826bd6cd38d6/winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/UriEncoding.cs#L120-L150","documentation":"A decoder limit in UriEncoding.Unescape: while decoding %XX-escaped UTF-8 sequences the routine assembles code points and rejects any above 0xFFFF, because the output is built with (char)/UTF-16 code units and no surrogate-pair handling exists. It fires when the escaped input encodes a supplementary-plane character (e.g. emoji) as a 4-byte UTF-8 sequence.","triggerScenarios":"Thrown at winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/UriEncoding.cs:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Strip or percent-encode supplementary-plane characters before unescaping","Decode with Uri.UnescapeDataString or a full UTF-8 decoder that emits surrogate pairs","Validate input ranges and reject/escape non-BMP code points upstream"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53fb989abc2219826385683a6fee826bd6cd38d6","analyzedAt":"2026-09-02T04:25:09.259Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}