{"record":{"id":"9faf83ec6302998c","repo":"google/tsunami-security-scanner","slug":"no-payload-implemented-for-s-vulnerability-type-s","errorCode":null,"errorMessage":"No payload implemented for %s vulnerability type, %s interpretation environment, and %s execution environment.","messagePattern":"No payload implemented for (.+?) vulnerability type, (.+?) interpretation environment, and (.+?) execution environment\\.","errorType":"exception","errorClass":"LookupError","httpStatus":null,"severity":"error","filePath":"plugin_server/py/plugin/payload/payload_generator.py","lineNumber":83,"sourceCode":"      config: Payload generator config detailing the attributes required for the\n        selected payload.\n\n    Returns:\n      A matching payload per the payload generator config.\n    \"\"\"\n    return self._generate_payload(config, False)\n\n  def _generate_payload(\n      self, config: pg.PayloadGeneratorConfig, use_callback: bool\n  ) -> Payload:\n    \"\"\"Find matching payload per the provided attributes.\"\"\"\n    payload = None\n    if self.tcs_client.is_callback_server_enabled() and use_callback:\n      payload = self._find_matching_payload(config, use_callback)\n    if not payload:\n      payload = self._find_matching_payload(config, False)\n    if not payload:\n      raise LookupError(\n          'No payload implemented for %s vulnerability type, %s interpretation'\n          ' environment, and %s execution environment.'\n          % (\n              pg.PayloadGeneratorConfig.VulnerabilityType.Name(\n                  config.vulnerability_type\n              ),\n              pg.PayloadGeneratorConfig.InterpretationEnvironment.Name(\n                  config.interpretation_environment\n              ),\n              pg.PayloadGeneratorConfig.ExecutionEnvironment.Name(\n                  config.execution_environment\n              ),\n          )\n      )\n    return payload\n\n  def _find_matching_payload(\n      self, config: pg.PayloadGeneratorConfig, use_callback: bool","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/google/tsunami-security-scanner/blob/363ba87b3543f8ae8e4304d3416818f03da7f262/plugin_server/py/plugin/payload/payload_generator.py#L65-L101","documentation":"PayloadGenerator.generate/generate_no_callback look up a payload matching the config's vulnerability type plus interpretation/execution environments. When the pre-loaded payload table has no match even without callback, LookupError is raised because the generator cannot fabricate a payload for that combination.","triggerScenarios":"Calling generate(config) with a VulnerabilityType / InterpretationEnvironment / ExecutionEnvironment combination that has no payload definition registered, or with use_callback=True when callback server handling yields no match and no fallback exists.","commonSituations":"Custom or recently added vulnerability types without corresponding payload definitions; payload files not loaded (wrong path/package); enum value typo mapping to an unsupported environment combination; plugin SDK version mismatch leaving new payload types undefined.","solutions":["Check the error message's three interpolated values and compare against the payload definitions actually loaded","Add a payload definition covering that vulnerability type + environments (in the payload proto/text resources)","Verify the payload files are being loaded and validated (payload_utility.get_parsed_payload) before generation","Fall back to a supported environment combination or catch LookupError and skip the vulnerability test"],"exampleFix":"// before\npayload = generator.generate(config)\n// after\ntry:\n  payload = generator.generate(config)\nexcept LookupError:\n  logging.warning('No payload for %s; skipping', config.vulnerability_type)\n  return None","handlingStrategy":"try-catch","validationCode":"def has_payload(generator, config):\n    return (generator._find_matching_payload(config, True) is not None or\n            generator._find_matching_payload(config, False) is not None)","typeGuard":null,"tryCatchPattern":"try:\n    payload = generator.generate(config)\nexcept LookupError as e:\n    logging.warning('Unsupported payload combination: %s', e)\n    payload = None","preventionTips":["Keep payload definitions in sync with every supported VulnerabilityType enum value","Write a startup check that generates a payload for each configured vulnerability type","Pin plugin and payload-resource versions together"],"tags":["python","payload","fuzzing","lookup"],"backgroundTag":"resource-not-found","analyzedSha":"363ba87b3543f8ae8e4304d3416818f03da7f262","analyzedAt":"2026-09-13T01:50:53.990Z","contentChangedAt":"2026-09-13T01:50:53.990Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}