A Semantic Attack on Google Gemini - Read the Latest Research
The vulnerability is a classic 'eval injection' found in the OpenC3 COSMOS API server. The security advisory and the provided patch point directly to the root cause. The commit 01e9fbc5e66e9a2500b71a75a44775dd1fc2d1de modifies two files, one for Ruby and one for Python. The vulnerability description specifically mentions that the cmd code path uses String#convert_to_value which executes eval(). Analyzing the patch for openc3/lib/openc3/core_ext/string.rb confirms this. The convert_to_value method on the Ruby String class explicitly used eval(self) if the string was determined to be an array-like structure. This is the vulnerable function. An unauthenticated attacker could send a JSON-RPC request with a specially crafted string parameter that would be passed to this function, leading to remote code execution. The fix involves replacing the dangerous eval() call with YAML.safe_load(), which is designed to safely parse data structures from strings. The corresponding Python file was also updated for consistency to handle object-like strings, but it was already using the safer ast.literal_eval, so the primary vulnerability was in the Ruby implementation.
String.convert_to_valueopenc3/lib/openc3/core_ext/string.rb
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| openc3 | rubygems | >= 5.0.6, < 6.10.2 | 6.10.2 |