-
Notifications
You must be signed in to change notification settings - Fork 221
feat(templated):cve-2026-33032 #867
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
copybara-service
merged 5 commits into
google:master
from
sanjaymahajan14:feature/cve-2026-33032
Aug 29, 2026
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7e1b1cc
feat(templated):cve-2026-33032
sanjaymahajan14 5f0b923
Update the description for CVE-2026-33032
sanjaymahajan14 161c0c1
Update templated/templateddetector/plugins/cve/2026/NginxUI_CVE_2026_…
sanjaymahajan14 d6f8c4b
Update templated/templateddetector/plugins/cve/2026/NginxUI_CVE_2026_…
sanjaymahajan14 b87d862
Update templated/templateddetector/plugins/cve/2026/NginxUI_CVE_2026_…
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
88 changes: 88 additions & 0 deletions
88
templated/templateddetector/plugins/cve/2026/NginxUI_CVE_2026_33032.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,88 @@ | ||
| # proto-file: proto/templated_plugin.proto | ||
| # proto-message: TemplatedPlugin | ||
|
|
||
| ############### | ||
| # PLUGIN INFO # | ||
| ############### | ||
|
|
||
| info: { | ||
| type: VULN_DETECTION | ||
| name: "NginxUI_CVE_2026_33032" | ||
| author: "sanjaymahajan14" | ||
| version: "1.0" | ||
| } | ||
|
|
||
| finding: { | ||
| main_id: { | ||
| publisher: "GOOGLE" | ||
| value: "CVE-2026-33032" | ||
| } | ||
| severity: CRITICAL | ||
| title: "Authentication bypass in Nginx UI MCP endpoint" | ||
| description: "Nginx UI versions 2.3.3 and earlier expose the /mcp_message endpoint without authentication when the IP allowlist is empty. A remote unauthenticated attacker can invoke privileged Model Context Protocol (MCP) operations." | ||
| recommendation: "Upgrade Nginx UI version 2.3.4 or later. If upgrading is not possible, disable MCP or restrict access using authentication and an IP allowlist. Do not expose Nginx UI directly to the Internet." | ||
| related_id: { | ||
| publisher: "CVE" | ||
| value: "CVE-2026-33032" | ||
| } | ||
| } | ||
|
|
||
| config: {} | ||
|
|
||
| ########### | ||
| # ACTIONS # | ||
| ########### | ||
|
|
||
| actions: { | ||
| name: "fingerprint_nginx_ui" | ||
| http_request: { | ||
| method: GET | ||
| uri: "/" | ||
| response: { | ||
| http_status: 200 | ||
| expect_any: { | ||
| conditions: [ | ||
| { body: {} contains: "Nginx UI" }, | ||
| { body: {} contains: "<title>Nginx UI</title>" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| actions: { | ||
| name: "probe_mcp_message" | ||
| http_request: { | ||
| method: POST | ||
| uri: "/mcp_message" | ||
| headers: [ | ||
| { name: "Accept" value: "application/json" }, | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| data: "{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"{{string}}\",\"version\":\"1.0\"}},\"id\":1}" | ||
|
sanjaymahajan14 marked this conversation as resolved.
Outdated
|
||
| response: { | ||
| http_status: 400 | ||
| expect_all: { | ||
| conditions: [ | ||
| { body: {} contains: "\"jsonrpc\":\"2.0\"" }, | ||
| { body: {} contains: "\"message\":\"Missing sessionId\"" }, | ||
| { body: {} contains: "\"id\":null" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| ############# | ||
| # WORKFLOWS # | ||
| ############# | ||
|
|
||
| workflows: { | ||
| variables: [ | ||
| { name: "string" value: "{{to_lower(rand_text_alpha(5))}}" } | ||
| ] | ||
|
sanjaymahajan14 marked this conversation as resolved.
Outdated
|
||
| actions: [ | ||
| "fingerprint_nginx_ui", | ||
| "probe_mcp_message" | ||
| ] | ||
| } | ||
68 changes: 68 additions & 0 deletions
68
templated/templateddetector/plugins/cve/2026/NginxUI_CVE_2026_33032_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,68 @@ | ||
| # proto-file: proto/templated_plugin_tests.proto | ||
| # proto-message: TemplatedPluginTests | ||
|
|
||
| config: { | ||
| tested_plugin: "NginxUI_CVE_2026_33032" | ||
| } | ||
|
|
||
| ######## | ||
| # TESTS # | ||
| ######## | ||
|
|
||
| tests: { | ||
| name: "whenVulnerable_returnsTrue" | ||
| expect_vulnerability: true | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "/" | ||
| status: 200 | ||
| body_content: "<!doctype html>\n<html lang=\"en\">\n <head>\n <title>Nginx UI</title>\n </head>\n <body><div id=\"app\"></div></body>\n</html>" | ||
| }, | ||
| { | ||
| uri: "/mcp_message" | ||
| status: 400 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| body_content: "{\"jsonrpc\":\"2.0\",\"id\":null,\"error\":{\"code\":-32602,\"message\":\"Missing sessionId\"}}" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| tests: { | ||
| name: "whenNotVulnerable_returnsFalse" | ||
| expect_vulnerability: false | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "/" | ||
| status: 200 | ||
| body_content: "<!doctype html>\n<html><head><title>Nginx UI</title></head></html>" | ||
| }, | ||
| { | ||
| uri: "/mcp_message" | ||
| status: 403 | ||
| headers: [ | ||
| { name: "Content-Type" value: "application/json" } | ||
| ] | ||
| body_content: "{\"message\":\"Authorization failed\"}" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| tests: { | ||
| name: "whenNotNginxUI_returnsFalse" | ||
| expect_vulnerability: false | ||
| mock_http_server: { | ||
| mock_responses: [ | ||
| { | ||
| uri: "TSUNAMI_MAGIC_ANY_URI" | ||
| status: 200 | ||
| body_content: "Welcome to Apache HTTP Server" | ||
| } | ||
| ] | ||
| } | ||
| } |
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.