|
300 | 300 | ] |
301 | 301 | } |
302 | 302 | }, |
| 303 | + { |
| 304 | + "type": "VULNERABILITIES", |
| 305 | + "description": "Query with string literal $1", |
| 306 | + "parameters": { |
| 307 | + "$1": [ |
| 308 | + "john", |
| 309 | + "username with 🌉 surrogate" |
| 310 | + ] |
| 311 | + }, |
| 312 | + "input": [ |
| 313 | + { |
| 314 | + "type": "SQL_INJECTION", |
| 315 | + "evidence": { |
| 316 | + "dialect": "MYSQL", |
| 317 | + "value": "select * from users where username = \"$1\" and last_name = 'another surrogate 😃'", |
| 318 | + "ranges": [ |
| 319 | + { |
| 320 | + "start": 14, |
| 321 | + "end": 19, |
| 322 | + "iinfo": { |
| 323 | + "type": "http.request.parameter", |
| 324 | + "parameterName": "table", |
| 325 | + "parameterValue": "users" |
| 326 | + } |
| 327 | + } |
| 328 | + ] |
| 329 | + } |
| 330 | + } |
| 331 | + ], |
| 332 | + "expected": { |
| 333 | + "sources": [ |
| 334 | + { |
| 335 | + "origin": "http.request.parameter", |
| 336 | + "name": "table", |
| 337 | + "value": "users" |
| 338 | + } |
| 339 | + ], |
| 340 | + "vulnerabilities": [ |
| 341 | + { |
| 342 | + "type": "SQL_INJECTION", |
| 343 | + "evidence": { |
| 344 | + "valueParts": [ |
| 345 | + { "value": "select * from " }, |
| 346 | + { "source": 0, "value": "users" }, |
| 347 | + { "value": " where username = \"" }, |
| 348 | + { "redacted": true }, |
| 349 | + { "value": "\" and last_name = '" }, |
| 350 | + { "redacted": true }, |
| 351 | + { "value": "'" } |
| 352 | + ] |
| 353 | + } |
| 354 | + } |
| 355 | + ] |
| 356 | + } |
| 357 | + }, |
303 | 358 | { |
304 | 359 | "type": "VULNERABILITIES", |
305 | 360 | "description": "POSTGRES Query with escaped string literal", |
|
929 | 984 | ] |
930 | 985 | } |
931 | 986 | }, |
| 987 | + { |
| 988 | + "type": "VULNERABILITIES", |
| 989 | + "description": "Query with string literal containing tainted range", |
| 990 | + "input": [ |
| 991 | + { |
| 992 | + "type": "SQL_INJECTION", |
| 993 | + "evidence": { |
| 994 | + "dialect": "POSTGRES", |
| 995 | + "value": "select * from users where username = 'john:doe:ADMIN'", |
| 996 | + "ranges": [ |
| 997 | + { |
| 998 | + "start": 43, |
| 999 | + "end": 46, |
| 1000 | + "iinfo": { |
| 1001 | + "type": "http.request.parameter", |
| 1002 | + "parameterName": "last_name", |
| 1003 | + "parameterValue": "doe" |
| 1004 | + } |
| 1005 | + } |
| 1006 | + ] |
| 1007 | + } |
| 1008 | + } |
| 1009 | + ], |
| 1010 | + "expected": { |
| 1011 | + "sources": [ |
| 1012 | + { |
| 1013 | + "origin": "http.request.parameter", |
| 1014 | + "name": "last_name", |
| 1015 | + "redacted": true |
| 1016 | + } |
| 1017 | + ], |
| 1018 | + "vulnerabilities": [ |
| 1019 | + { |
| 1020 | + "type": "SQL_INJECTION", |
| 1021 | + "evidence": { |
| 1022 | + "valueParts": [ |
| 1023 | + { "value": "select * from users where username = '" }, |
| 1024 | + { "redacted": true }, |
| 1025 | + { "source": 0, "redacted": true }, |
| 1026 | + { "redacted": true }, |
| 1027 | + { "value": "'" } |
| 1028 | + ] |
| 1029 | + } |
| 1030 | + } |
| 1031 | + ] |
| 1032 | + } |
| 1033 | + }, |
932 | 1034 | { |
933 | 1035 | "type": "VULNERABILITIES", |
934 | 1036 | "description": "Query with string literal and tainted range crossing boundaries", |
|
978 | 1080 | ] |
979 | 1081 | } |
980 | 1082 | }, |
| 1083 | + { |
| 1084 | + "type": "VULNERABILITIES", |
| 1085 | + "description": "Query with tainted range in two LIKEs with not tainted % char", |
| 1086 | + "input": [ |
| 1087 | + { |
| 1088 | + "type": "SQL_INJECTION", |
| 1089 | + "evidence": { |
| 1090 | + "dialect": "MYSQL", |
| 1091 | + "value": "select * from table where name LIKE '%searchparam%' OR description LIKE '%searchparam%'", |
| 1092 | + "ranges": [ |
| 1093 | + { |
| 1094 | + "start": 38, "end": 49, "iinfo": { "type": "http.request.parameter", "parameterName": "query", "parameterValue": "searchparam" } |
| 1095 | + }, |
| 1096 | + { |
| 1097 | + "start": 74, "end": 85, "iinfo": { "type": "http.request.parameter", "parameterName": "query", "parameterValue": "searchparam" } |
| 1098 | + } |
| 1099 | + ] |
| 1100 | + } |
| 1101 | + } |
| 1102 | + ], |
| 1103 | + "expected": { |
| 1104 | + "sources": [ |
| 1105 | + { "origin": "http.request.parameter", "name": "query", "redacted": true } |
| 1106 | + ], |
| 1107 | + "vulnerabilities": [ |
| 1108 | + { |
| 1109 | + "type": "SQL_INJECTION", |
| 1110 | + "evidence": { |
| 1111 | + "valueParts": [ |
| 1112 | + { "value": "select * from table where name LIKE '" }, |
| 1113 | + { "redacted": true }, |
| 1114 | + { "source": 0, "redacted": true }, |
| 1115 | + { "redacted": true }, |
| 1116 | + { "value": "' OR description LIKE '" }, |
| 1117 | + { "redacted": true }, |
| 1118 | + { "source": 0, "redacted": true }, |
| 1119 | + { "redacted": true }, |
| 1120 | + { "value": "'" } |
| 1121 | + ] |
| 1122 | + } |
| 1123 | + } |
| 1124 | + ] |
| 1125 | + } |
| 1126 | + }, |
981 | 1127 | { |
982 | 1128 | "type": "VULNERABILITIES", |
983 | 1129 | "description": "Query with string literal and weird tainted range crossing boundaries", |
|
0 commit comments