You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gagandeep Singh Rawat <ga...@msbdocs.com> on 2025/10/31 04:54:55 UTC
400 Bad Request
Hi Team
I am getting below error which is expected but tomcat reply show its version and it is vulnerabilities detected by our VAPT team.
[cid:image001.png@01DC4A50.98FC8F80]
Can you advise how can I change the source file so that it does not show version on response.? I could handle 404 error by placing 404.html file in /ROOT/ directory however same is not applicable in 400 response.
Thank you for choosing MSB Docs,
Gagandeep Singh Rawat
DevOps Engineer | gagandeep.rawat@msbdocs.com
MSB DOCS<https://link.omandatapark.com/click/PTgPTcKQBmq0.Nrr7Sn45yotT.zizjqQ5zR1Y/y-_cS-ae/3s/link.omandatapark.com/click/eDbGT-iZw2rj.cJF_LAP2_Ksa.X-CmzA2lnUI/8lyWamtT/3s/msbdocs.com/> [cid:image002.gif@01DC4A50.98FC8F80] <https://link.omandatapark.com/click/PTgPTcKQBmq0.Nrr7Sn45yotT.zizjqQ5zR1Y/qv4nmECe/3s/link.omandatapark.com/click/eDbGT-iZw2rj.cJF_LAP2_Ksa.X-CmzA2lnUI/-Cw9tzoM/3s/www.linkedin.com/company/msbdocs/mycompany/verification/> www.msbdocs.com<https://link.omandatapark.com/click/PTgPTcKQBmq0.Nrr7Sn45yotT.zizjqQ5zR1Y/a_fMg9Pk/3s/link.omandatapark.com/click/eDbGT-iZw2rj.cJF_LAP2_Ksa.X-CmzA2lnUI/FTQ7468N/3/www.msbdocs.com>
Featured in Gartner's Market Guide for E-Signatures<https://link.omandatapark.com/click/PTgPTcKQBmq0.Nrr7Sn45yotT.zizjqQ5zR1Y/T_jTEAHG/3s/link.omandatapark.com/click/eDbGT-iZw2rj.cJF_LAP2_Ksa.X-CmzA2lnUI/qRCTdbi7/3s/msbdocs.com/wp-content/uploads/2022/07/Market_Guide_for_Ele_2022.pdf>
Awarded on G2 Marketplace<https://link.omandatapark.com/click/PTgPTcKQBmq0.Nrr7Sn45yotT.zizjqQ5zR1Y/EQViRyEn/3s/link.omandatapark.com/click/eDbGT-iZw2rj.cJF_LAP2_Ksa.X-CmzA2lnUI/CTwcmgga/3s/www.g2.com/products/msb-docs/reviews>
CONFIDENTIALITY: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure. If the reader of this message is not the intended recipient or an employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, kindly notify us immediately by e-mail and delete the original message. Thank you.
Re: 400 Bad Request
Posted by Olaf Kock <to...@olafkock.de>.
Am 31.10.25 um 05:54 schrieb Gagandeep Singh Rawat:
>
>
> Can you advise how can I change the source file so that it does not
> show version on response.? I could handle 404 error by placing
> 404.html file in /ROOT/ directory however same is not applicable in
> 400 response.
>
>
https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Error_Report_Valve
Re: 400 Bad Request
Posted by Mark Thomas <ma...@apache.org>.
On 31/10/2025 04:54, Gagandeep Singh Rawat wrote:
> Hi Team
>
> I am getting below error which is expected but tomcat reply show its
> version and it is vulnerabilities detected by our VAPT team.
That isn't a vulnerability.
You should be running a Tomcat version either with no known, published
vulnerabilities or one where you know that the known published
vulnerabilities do not apply to your configuration.
If you aren't doing the above then you are knowingly running a Tomcat
version with a known vulnerability that impacts your configuration and
that IS a problem. And hiding the version number won't change that.
A potential attacker knowing the version of Tomcat you are running
doesn't change any of the above.
Hiding the version number from an attacker doesn't change any of the
above or improve your security any meaningful way.
> Can you advise how can I change the source file so that it does not show
> version on response.? I could handle 404 error by placing 404.html file
> in /ROOT/ directory however same is not applicable in 400 response.
Wrong question. You are assuming the solution requires a source code change.
If you need to hide the version number so that you can tick a box in a
"security" checklist then you have a few options.
Several of those options are described at:
https://tomcat.apache.org/tomcat-11.0-doc/security-howto.html#Valves
Alternatively look at the benefits of configuring the "errorCode.0"
attribute (and possible individual error codes) on the Error Report Valve:
https://tomcat.apache.org/tomcat-11.0-doc/config/valve.html#Error_Report_Valve
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org