BNavin118206 (Community Member) asked a question.

Improper input handling host header in login page

The application uses the input coming from the host or x- forward​ed host request headers as part of the response without proper validation.information from these headers shouid not be trusted as it is just another client side value an attacker can tamper with which can result in unintended behaviour.

​

They suggested recommends is given in Apache you can make SERVER-NAME trusty worthy which can be done by creating a dumy vhost that catches all requests with invalid host headers.another method under nginx is to specify a non wild-card server name and turning the usecanonicalName directive on

​

What should I do ,I did not understand what I added.please give me a solution .

​

Thank you​


  • Hi @BNavin118206 (Community Member)​ ,

     

    Could you provide more information about the flaw you're attempting to fix? For example, Veracode product and CWE ID?

     

    In general, we'd recommend not relying on any hostname from the HTTP Request, even if you configure the application server (Apache / Nginx) to generate this, your application will not be able to detect if this is in place and it will be difficult to audit.

    We'd recommend instead to have a local configuration file wherein you have the domain that the application should use.

     

    Thank you,

    Boy Baukema

    Expand Post
    • BNavin118206 (Community Member)

      Hi Baukema,how to configure Apache/nginx.on which file I need to change,what code can I do.i am doing some analysis about virtual host configuration for apache.but I am not understanding where and which file can I add code.

      ​

      Please let me know thank you

      ​

      ​

      Expand Post

Topics (4)

No articles found
Loading

Ask the Community

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