wololo! - #3056
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 92d3964. Configure here.
| @background_worker = Sentry::BackgroundWorker.new(config) | ||
| @session_flusher = config.session_tracking? ? Sentry::SessionFlusher.new(config, client) : nil | ||
| @backpressure_monitor = config.enable_backpressure_handling ? Sentry::BackpressureMonitor.new(config, client) : nil | ||
| @wololo = config.wololo ? Sentry::Wololo.new(config) : nil |
There was a problem hiding this comment.
Untrusted LLM patch output is evaluated as Ruby, enabling RCE
When Wololo is enabled, the remote LLM response is treated as Ruby source and evaluated in TOPLEVEL_BINDING without enforcing that it contains only method definitions. A response containing one valid method plus a top-level operation such as system, file access, or network access can therefore execute arbitrary code in the application process; request-controlled exception data is included in the LLM prompt and can enable prompt injection.
Evidence
- Request exceptions captured by the Rack integration reach
Hub#capture_exception, which callsSentry.wololo&.record(exception)when the opt-in worker is enabled. Wololo#request_patchembeds the exception message, backtrace, and source files in a prompt and accepts the remotechat.askresponse as patch data.apply_patcheschecks syntax, safe file paths, loaded targets, source locations, and a small forbidden method-name list, but does not enforce an AST-level method-only structure. A patch such asdef existing; end\nsystem('...')can satisfy the target/source checks.apply_prepend_patchinterpolates that source intoTOPLEVEL_BINDING.eval("Module.new {\n#{source}\n}", ...), executing the top-level operation immediately in the application process before prepending the module.
Also found at 4 additional locations
sentry-ruby/lib/sentry/hub.rb:174-174sentry-ruby/lib/sentry/wololo.rb:91-99sentry-ruby/lib/sentry/wololo.rb:386-388sentry-ruby/lib/sentry/wololo.rb:426-501
Identified by Warden · security-review · NWG-8RS
| @background_worker = Sentry::BackgroundWorker.new(config) | ||
| @session_flusher = config.session_tracking? ? Sentry::SessionFlusher.new(config, client) : nil | ||
| @backpressure_monitor = config.enable_backpressure_handling ? Sentry::BackpressureMonitor.new(config, client) : nil | ||
| @wololo = config.wololo ? Sentry::Wololo.new(config) : nil |
There was a problem hiding this comment.
Opt-in Wololo sends unredacted application source and exception data to OpenRouter
When an application enables config.wololo and supplies an OpenRouter key, captured exceptions with in-app frames cause Wololo to send exception messages, backtraces, and up to 200 KB of local application source to OpenRouter. Source files and exception data may contain credentials or PII, and the request has no redaction or configurable filtering before crossing the application’s data boundary.
Evidence
Sentry::Hub#capture_exceptioncallsSentry.wololo&.record(exception)before normal event filtering, so captured exceptions—including messages containing caller-controlled request data—can enter the Wololo queue.Wololo#issue_fromandsource_filescollect the exception class, message, backtrace, and up to 10 source files under the configured project root and application directories, with a 200 KB total limit but no secret filtering.Wololo#request_patchembeds those values in the prompt and sends it throughRubyLLM.chat(provider: "openrouter").ask(prompt)using the configured OpenRouter API key.- Wololo is disabled by default, but enabling it is the explicit security boundary; the effective path contains no redaction or consent-specific data controls beyond that opt-in.
Identified by Warden · security-review · NKH-YZD

HACKWEEK DO NOT MERGE