CP695435 (Community Member) asked a question.

How to Fix flaws for CWE ID 113 : HTTP Response Splitting.

I have this line of code 

response.setContentType(ExaminUtils.encodeForJava(MIMEType));

response.setContentType(ExaminUtils.encodeForCDATA(MIMEType));

 

But both didnt resolve the issue in static analysis.

 


  • Anthony Fielding (Veracode)

    Hi @CP695435 (Community Member)​,

    It is likely the reason the flaw continues to be reported is because the functions you are using are not in the list of Supported Cleansing Functions, which you can find in the Help Center here: https://help.veracode.com/go/review_cleansers. For example the supported function org.owasp.encoder.Encode.forJava() would cleanse for CWE-113, as well as CWE-117, CWE-80 and CWE-93. Please note that it is important to select the appropriate cleansing function for the context.

     

    I hope that answers your question.

     

    Thanks,

    Anthony Fielding

    Expand Post

Topics (1)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.