Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAF Plugin Incorrectly Flags Parameters Starting with "sh" as Security Risk #1619

Open
lingcoder opened this issue Dec 23, 2024 · 1 comment

Comments

@lingcoder
Copy link

lingcoder commented Dec 23, 2024

Ⅰ. Issue Description

When the WAF plugin is enabled, requests with parameters starting with "sh" are incorrectly flagged as a potential shell script execution risk. Then my http status code was changed to 403 by higress.

Ⅱ. Describe what happened

After enabling the WAF plugin in Higress, I find the request gets blocked and flagged as a potential shell script execution risk. This detection seems overly simplistic and could lead to false positives for legitimate requests.

If there is an exception, please attach the exception trace:

a63a29d496917bdbcdccd43a9950d3a

Ⅲ. Describe what you expected to happen

I expect the WAF plugin to have a more intelligent approach to identifying security risks, rather than simply blocking requests based on the beginning of parameter values, in order to avoid false positives.

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. Enable the WAF plugin in Higress.
  2. Send a request with a parameter "bizSource" with value that starts with "sh".
  3. Observe the request being blocked.

Ⅴ. Anything else we need to know?

No additional information at this time.

Ⅵ. Environment:

  • Higress version: v2.0.0
  • OS: ubuntu22.04
  • Others:

@johnlanni
Copy link
Collaborator

Currently, the owasp 4.0.0-rc1 rule engine is being used. We will upgrade to the latest version later. For now, we can bypass it like this:

  1. Configure an independent waf plugin configuration for this route
  2. In secRules, configure SecRuleRemoveById 932250 to remove this problematic rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants