Rule 932200 from https://github.com/coreruleset/coreruleset/blob/v4.0/dev/rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf creating false positives for GraphQL query
See original GitHub issueDescription
For certain GraphQL queries the rule 932200 is creating false positives. For example, for the following GraphQL query, the rule is tracing $f and blocking it even though its a valid request:
query HeroComparison($first: Int = 3) {
leftComparison: hero(episode: EMPIRE) {
...comparisonFields
}
rightComparison: hero(episode: JEDI) {
...comparisonFields
}
}
fragment comparisonFields on Character {
name
friendsConnection(first: $first) {
totalCount
edges {
node {
name
}
}
}
}
Audit Logs / Triggered Rule Numbers
POC: https://regex101.com/r/Y1F1ko/1
Rule 932200 of shell injection URL: https://github.com/coreruleset/coreruleset/blob/v4.0/dev/rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf
Confirmation
[x] I have removed any personal data (email addresses, IP addresses, passwords, domain names) from any logs posted.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Blocking graphql queries · Issue #1775 - GitHub
Audit Logs / Triggered Rule Numbers. I'm trying to setup ModSecurity in my server, but first I'm setting up locally for testing. The...
Read more >GraphQL query best practices
When creating queries and mutations, follow these best practices to get the most out of both GraphQL and Apollo tooling. Name all operations....
Read more >OWASP Rules and Graphql - Stack Overflow
What rules of OWASP are triggering a false positive in your requests? GraphQL requests are nothing more than a POST request but you...
Read more >GraphQL Library Detection - Invicti
Invicti can detect GraphQL endpoints and libraries by sending specific queries. The GraphQL library detection is enabled by default.
Read more >Validation - GraphQL
Validation. By using the type system, it can be predetermined whether a GraphQL query is valid or not. This allows servers and clients...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately yes, @fuomag9. And there is very little we can do with CRS alone. The problem is the lack of parser in ModSec (compare with XML and JSON …).
An example GraphQL query could be this: