%3CLINGO-SUB%20id%3D%22lingo-sub-1607991%22%20slang%3D%22en-US%22%3ECustom%20Error%20Page%20vulnerability%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1607991%22%20slang%3D%22en-US%22%3E%3CP%3EIIS%20comes%20with%20default%20error%20pages.%20In%20order%20to%20help%20troubleshooting%20issues%2C%20these%20error%20pages%20may%20provide%20detailed%20information%20about%20the%20application%20and%20server.%20Therefore%2C%20some%20penetration%20testing%20tools%20may%20flag%20this%20situation%20as%20a%20vulnerability.%20An%20example%20pentest%20report%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EMissing%20Custom%20Error%20Page%20(CWE%20ID%20756)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EThe%20software%20fails%20to%20return%20custom%20error%20pages%20to%20the%20user%2C%20possibly%20resulting%20in%20an%20information%20leak.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Nedim_0-1598276136830.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F214320i20934C65808BFA3D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Nedim_0-1598276136830.jpeg%22%20alt%3D%22Nedim_0-1598276136830.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1224912777%22%20id%3D%22toc-hId-1224912777%22%3ESolution%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUnless%20detailed%20error%20pages%20are%20enabled%20for%20remote%20requests%20in%20IIS%2C%20I%20wouldn%E2%80%99t%20classify%20this%20situation%20as%20a%20critical%20vulnerability.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Nedim_1-1598276136838.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F214319i57A6417EAC559D17%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Nedim_1-1598276136838.png%22%20alt%3D%22Nedim_1-1598276136838.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20have%20a%20clean%20security%20scan%20report%20(and%20you%20want%20your%20users%20to%20see%20more%20meaningful%20error%20pages)%2C%20you%20can%20create%20custom%20error%20pages.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20case%20I%20worked%20on%2C%20the%20tool%20brought%20up%20this%20report%20for%20a%20folder%20that%20doesn%E2%80%99t%20have%20a%20default%20page.%20For%20this%20situation%2C%20there%20are%20a%20few%20easy%20workarounds%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAdd%20an%20index.html%20file%20to%20the%20folder.%20This%20should%20prevent%20that%20URL%20to%20be%20flagged%20again%3C%2FLI%3E%0A%3CLI%3ECustomize%20IIS%20defaullt%20page%20for%20403%20error%20(C%3A%5Cinetpub%5Ccusterr%5Cen-US%5C403.html).%20Pentest%20tool%20is%20likely%20to%20mark%20the%20URL%20pass%20if%20that%20page%20is%20customized%3C%2FLI%3E%0A%3CLI%3EEnforce%20custom%20error%20pages%20in%20web.config%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1607991%22%20slang%3D%22en-US%22%3E%3CP%3EIIS%20comes%20with%20default%20error%20pages.%20In%20order%20to%20help%20troubleshooting%20issues%2C%20these%20error%20pages%20may%20provide%20detailed%20information%20about%20the%20application%20and%20server.%20Therefore%2C%20some%20penetration%20testing%20tools%20may%20flag%20this%20situation%20as%20a%20vulnerability.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

IIS comes with default error pages. In order to help troubleshooting issues, these error pages may provide detailed information about the application and server. Therefore, some penetration testing tools may flag this situation as a vulnerability. An example pentest report:

 

Missing Custom Error Page (CWE ID 756)
The software fails to return custom error pages to the user, possibly resulting in an information leak.

 

Nedim_0-1598276136830.jpeg

 

 

Solution

 

Unless detailed error pages are enabled for remote requests in IIS, I wouldn’t classify this situation as a critical vulnerability.

Nedim_1-1598276136838.png

 

If you want to have a clean security scan report (and you want your users to see more meaningful error pages), you can create custom error pages.

 

In the case I worked on, the tool brought up this report for a folder that doesn’t have a default page. For this situation, there are a few easy workarounds:

 

  1. Add an index.html file to the folder. This should prevent that URL to be flagged again
  2. Customize IIS defaullt page for 403 error (C:\inetpub\custerr\en-US\403.html). Pentest tool is likely to mark the URL pass if that page is customized
  3. Enforce custom error pages in web.config