Proxy Disclosure - return False Positive results
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.8k
- Forks
- 2.6k
- Avg merge
- 13h 16m
- Merged PRs (30d)
- 17
Description
Describe the bug:
When setting up server annotations and headers for serving content using nginx-ingress:
The ZAP Proxy marks this configuration as a vulnerability with a Medium Risk Level and provides the following description:
more_clear_headers "Server";
Using the TRACE, OPTIONS, and TRACK methods, the following proxy servers have been identified between ZAP and the application/web server: - Unknown The following web/application server has been identified: - Unknown
more_set_headers "server: hide";
Using the TRACE, OPTIONS, and TRACK methods, the following proxy servers have been identified between ZAP and the application/web server: - hide The following web/application server has been identified: - hide
Steps to reproduce the behavior:
- Deploy simple application on k8s server exposed using nginx-ingress
- Add such configuration to your ingress deployment:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: simple-app
namespace: default
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/configuration-snippet: |
more_clear_headers "X-Powered-By";
more_clear_headers "Server";
if ($request_method ~* "(TRACE|TRACK)") {
return 405;
}
- Run ZAP Proxy against your deployed application and verify the results
Expected behavior:
When Server header is remove using annotation more_clear_headers "Server"; this vurnability should be not present.
Software versions:
ZAP Version: 2.15.0
Screenshots:
Errors from the zap.log file:
No response
Additional context:
No response
Would you like to help fix this issue?
- Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the alert with ZAP 2.15.0 against an application exposed through nginx-ingress using the provided annotations, especially the cleared Server header and blocked TRACE/TRACK methods. Trace the Proxy Disclosure alert handling and verify that a configuration hiding the Server header no longer produces this false positive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kubernetes, nginx
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100