{"record":{"id":"27890b7aa0a500c0","repo":"diegosouzapw/OmniRoute","slug":"security-001-27890b","errorCode":"SECURITY_001","errorMessage":"Request blocked: potential prompt injection detected","messagePattern":"Request blocked: potential prompt injection detected","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"src/app/api/v1/images/edits/route.ts","lineNumber":340,"sourceCode":"    return errorResponse(\n      HTTP_STATUS.BAD_REQUEST,\n      \"Invalid request body. Send multipart/form-data or JSON with a data-URL image.\"\n    );\n  }\n\n  const { prompt, model, size, responseFormat, imageBytes, imageMime, images, imageInputCount } =\n    input;\n  if (!prompt) {\n    return errorResponse(HTTP_STATUS.BAD_REQUEST, \"Missing required field: prompt\");\n  }\n  const injectionDecision = createInjectionGuard()({ prompt });\n  if (injectionDecision.blocked) {\n    return jsonResponse(\n      {\n        error: {\n          message: \"Request blocked: potential prompt injection detected\",\n          type: \"injection_detected\",\n          code: \"SECURITY_001\",\n          detections: injectionDecision.result.detections.length,\n        },\n      },\n      HTTP_STATUS.BAD_REQUEST\n    );\n  }\n  if (imageInputCount !== images.length) {\n    return errorResponse(HTTP_STATUS.BAD_REQUEST, \"Invalid reference image\");\n  }\n  if (!imageBytes || imageBytes.length === 0) {\n    return errorResponse(HTTP_STATUS.BAD_REQUEST, \"Missing required field: image\");\n  }\n\n  const fullModel = model || \"cgpt-web/gpt-5.5\";\n\n  const policy = await enforceApiKeyPolicy(request, fullModel);\n  if (policy.rejection) return policy.rejection;\n","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/api/v1/images/edits/route.ts#L322-L358","documentation":"Error \"Request blocked: potential prompt injection detected\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/api/v1/images/edits/route.ts:340 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}