zaproxy / zaproxy/zaproxy

Proxy Disclosure - return False Positive results

Open
#8,664 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:
  1. Deploy simple application on k8s server exposed using nginx-ingress
  2. 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;
      }
  1. 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:

image

Errors from the zap.log file:

No response

Additional context:

No response

Would you like to help fix this issue?
  • Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.