-
Notifications
You must be signed in to change notification settings - Fork 54
TestBeds/CVE-2026-9082 #236
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
Open
sanjaymahajan14
wants to merge
1
commit into
google:main
Choose a base branch
from
sanjaymahajan14:testbeds/cve-2026-9082
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+163
−0
Open
Changes from all commits
Commits
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
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,78 @@ | ||||||||||||||||||||||||||
| # SQL Injection in Drupal Core (CVE-2026-9082) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Drupal Core versions 11.1.0 and earlier (when running on a PostgreSQL database backend) fail to properly sanitize associative array keys during entity query condition translation. A remote unauthenticated attacker can supply crafted payload array keys via JSON endpoints to execute arbitrary SQL commands. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Vulnerable Version | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Setup | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Start Drupal version 11.3.9-apache (Vulnerable): | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```sh | ||||||||||||||||||||||||||
| docker compose up -d drupal_vuln postgres_vuln | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. Access http://localhost:8080 in your browser. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 2. Complete the setup wizard with the following settings: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Language: English | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Profile: Standard | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database type: PostgreSQL | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database name: drupal | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database username: drupal | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database password: drupal_password | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Host: postgres_vuln | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Port: 5432 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Site name: Drupal Lab (Vulnerable) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Username: admin | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Password: admin@123 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Email: admin@example.com | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Safe Version | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Setup | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Start Drupal version 11.3.10-apache (Safe) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```sh | ||||||||||||||||||||||||||
| docker compose up -d drupal_patched postgres_patched | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| 1. Access http://localhost:8081 in your browser. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 2. Complete the setup wizard with the following settings: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Language: English | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Profile: Standard | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database type: PostgreSQL | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database name: drupal | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database username: drupal | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Database password: drupal_password | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Host: postgres_patched | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Port: 5432 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Site name: Drupal Lab (Safe) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Username: admin | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Password: admin@123 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Admin Email: admin@example.com | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
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,85 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| # ========================================== | ||
| # VULNERABLE ENVIRONMENT (Available on Port 8080) | ||
| # ========================================== | ||
| postgres_vuln: | ||
| image: postgres:16 | ||
| container_name: drupal-postgres-vuln | ||
| environment: | ||
| POSTGRES_DB: drupal | ||
| POSTGRES_USER: drupal | ||
| POSTGRES_PASSWORD: drupal_password | ||
| ports: | ||
| - "5432:5432" | ||
| volumes: | ||
| - postgres_data_vuln:/var/lib/postgresql/data | ||
| networks: | ||
| - drupalnet | ||
| restart: always | ||
|
|
||
| drupal_vuln: | ||
| image: docker.io/drupal:11.3.9-apache | ||
| container_name: drupal-vuln | ||
| depends_on: | ||
| - postgres_vuln | ||
| ports: | ||
| - "8080:80" | ||
| environment: | ||
| DRUPAL_DB_HOST: postgres_vuln | ||
| DRUPAL_DB_NAME: drupal | ||
| DRUPAL_DB_PORT: 5432 # Fixed: 5432 is the default for PostgreSQL | ||
| DRUPAL_DB_USER: drupal | ||
| DRUPAL_DB_PASSWORD: drupal_password | ||
| volumes: | ||
| - drupal_data_vuln:/var/www/html | ||
| networks: | ||
| - drupalnet | ||
| restart: always | ||
|
|
||
| # ========================================== | ||
| # PATCHED ENVIRONMENT (Available on Port 8081) | ||
| # ========================================== | ||
| postgres_patched: | ||
| image: postgres:16 | ||
| container_name: drupal-postgres-patched | ||
| environment: | ||
| POSTGRES_DB: drupal | ||
| POSTGRES_USER: drupal | ||
| POSTGRES_PASSWORD: drupal_password | ||
| ports: | ||
| - "5433:5432" # Exposed on 5433 to avoid conflict with the vulnerable DB | ||
| volumes: | ||
| - postgres_data_patched:/var/lib/postgresql/data | ||
| networks: | ||
| - drupalnet | ||
| restart: always | ||
|
|
||
| drupal_patched: | ||
| image: docker.io/drupal:11.3.10-apache # Assuming .10 is the patched release | ||
| container_name: drupal-patched | ||
| depends_on: | ||
| - postgres_patched | ||
| ports: | ||
| - "8081:80" # Exposed on 8081 | ||
| environment: | ||
| DRUPAL_DB_HOST: postgres_patched | ||
| DRUPAL_DB_NAME: drupal | ||
| DRUPAL_DB_PORT: 5432 | ||
| DRUPAL_DB_USER: drupal | ||
| DRUPAL_DB_PASSWORD: drupal_password | ||
| volumes: | ||
| - drupal_data_patched:/var/www/html | ||
| networks: | ||
| - drupalnet | ||
| restart: always | ||
|
|
||
| volumes: | ||
| postgres_data_vuln: | ||
| drupal_data_vuln: | ||
| postgres_data_patched: | ||
| drupal_data_patched: | ||
|
|
||
| networks: | ||
| drupalnet: |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.