• arichards (Veracode)

    Hi,

     

    The reason CWE-297 is identified is because the TrustManager that is being used implies that it is trusting all certificates presented by services being connected to. It is recommended to use a TrustManager that validates the certificates are well-formed, signed, and follows the chain of trust, as well as verifying that the certificate matches was issued to the host being connected to. For instance, if you were connecting to "mysite.com" and the certificate presented was valid, but issued to "evil.com" then checking the Common Name against the name of the host would ensure that connection would not be considered valid.

     

    Typically using a TrustManager that accepts all certificates is only used for testing purposes. It is not recommended to use this approach in production environments.

     

    If you have any other questions, I would recommend you schedule a consultation call to discuss: https://help.veracode.com/r/review_main , or you can send an email to Support@veracode.com with the application and scan name so we can look into the identified flaw to provide you more specific feedback.

     

    Regards,

    Veracode Application Security Consulting Team

    Expand Post

Topics (3)

No articles found
Loading

Ask the Community

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