Source Code Disclosure - File inclusion can be false positive?

439 views
Skip to first unread message

Hashim Mohammed

unread,
Apr 12, 2018, 6:35:53 AM4/12/18
to OWASP ZAP User Group
While running zap Active Scan on my web application I get this alert "Source Code Disclosure - File Inclusion". But in response "400-Bad request" and returns an error message as JSON. I have cross checked the message, there nothing vulnerable and no source code is disclosed. I am new to ZAP and am kind of stuck here. Any kind of help is appreciated.

Thank you.

ps: I have try ZAP test again with "null" as return message, still I am getting the same alert.

kingthorin+owaspzap

unread,
Apr 12, 2018, 12:12:02 PM4/12/18
to OWASP ZAP User Group
With out the specific request, response, and alert details there’s not much we can say at this point.

If you’re able to share the details feel free to attach them to a new issue: https://github.com/zaproxy/zaproxy/issues/new

Hashim Mohammed

unread,
Apr 16, 2018, 2:20:35 AM4/16/18
to OWASP ZAP User Group
Can you please tell me how this File Inclusion attacks works and what are the possible outcomes(Response). In my case, it returns only Exception message as JSON. I couldn't find any source code disclosure with that response.  But without proper details I can't conclude it as false positive.

Hashim Mohammed

unread,
Apr 16, 2018, 2:55:50 AM4/16/18
to OWASP ZAP User Group
I have attached the response and alert detils, kindly please check it.


On Thursday, 12 April 2018 21:42:02 UTC+5:30, kingthorin+owaspzap wrote:
FileInclusionRespnse.PNG
FileInclusionDetails.PNG

Jyotsna Ahuja

unread,
Sep 30, 2019, 3:07:34 AM9/30/19
to OWASP ZAP User Group
Were you able to resolve this? I am facing a similar issue. 

Thanks

Peter Hauschulz

unread,
Sep 30, 2019, 6:55:55 AM9/30/19
to OWASP ZAP User Group
At the bottom of the response body it doesn't disclose full source code, but does disclose some method names, libraries and lines. 

It's up to you to decide whether that is a false positive or not, but I would consider it 'Application Error Disclsoure' at least and to be a genuine issue that needs fixing.

Jyotsna Ahuja

unread,
Sep 30, 2019, 8:29:46 AM9/30/19
to OWASP ZAP User Group
Thanks Peter. It does not disclose anything. Its a normal response for a public GET API. But I got your point. Thanks for clarifying.

kingthorin+owaspzap

unread,
Sep 30, 2019, 10:57:31 AM9/30/19
to OWASP ZAP User Group

is a normal API response? It's leaking what parser is being used, it's leaking version info, etc. While it technically might not be "source code" it is information that end users don't need and that you shouldn't want adversaries to have.
Reply all
Reply to author
Forward
0 new messages