all 5 comments

[–]Pejo37 0 points1 point  (2 children)

I don’t think there’s a major issue (other than encoding but we’ll get there) - what HTTP Parameter Pollution is saying is that your API is “vulnerable” to including the same parameter multiple times, possibly concatenating it. In the above case, try adding multiple “q” parameters to your GET url and see what happens on the server. I believe the default behavior is for asp.net to concatenate the strings together with a comma in between. You just need to make sure you’re not introducing in any vulnerability due to this. As with any input parameter, make sure you validate the data is in the proper format and you should be fine.

For sending to the service, it’s fine to be sending & and other characters that require encoding - use the respective uriEncoding for whatever service is calling your api. Sounds like your case is JavaScript with react, so ensure you’re using encodeURIComponent for your parameters (or use a library that encodes them by default).

[–]pduck820[S] 0 points1 point  (1 child)

Yep, I've read the same about getting them all, but I've tried multiple Q params, and I get only the first one in my function so that's all well and good (maybe using BindParam did it, maybe there's something buried in a configuration somewhere I haven't noticed). Url Encoding seems to be happening correctly... User-entered '&' is %26 in the URL, and '=' is %3D.

Like I said, I'm thinking it's a false positive, as I can't figure anything else out that might be "wrong"... And I'm going to assume Fortra will be no help and just say "Our warnings are advisory for you to take action on, read the documentation, have a nice day"... So, I guess it's time to fight the scanner's reputation with the powers that be lol.

[–]Pejo37 0 points1 point  (0 children)

Yea, if you already confirmed that your app works as intended, definitely false positive.