
DLo611921 (Community Member) asked a question.
I have CWE-117 being identified in multiple locations within different applications. I understand that owasp encoding the log outputs could remediate the flaw. I'm able to set up encoding of the logs through log4j's configuration XML, but Veracode doesn't seem to pick that up as a remediation.
I'd like to know if the solution with log4j's configuration sufficient for me to mitigate the flaws. Doing so would prevent me from having to make plenty of code changes throughout each application. This would save time remediating the flaws and without having to encode log outputs when we develop new features.
I'm also open to other solutions as well.
.png)
Hi @DLo611921 (Community Member) ,
Encoding or removing CR and LF characters will remove risk presented by CWE 117 flaws, however it cannot be automatically detected by Veracode Static Analysis.
If you chose this remediation you will need to either mitigate all instances of CWE 117 or request that your security team create a separate policy that excludes CWE 117 for your application.
The only other options that we are able to automatically detect are:
Alternatively you may also consider using a custom cleansing attribute ( https://community.veracode.com/s/question/0D52T00004ymJzySAE/veracode-custom-cleansers ).
Please let me know if you have any remaining questions or concerns.
Thank you,
Boy Baukema