{"record":{"id":"08332ca9b60abf86","repo":"BerriAI/litellm","slug":"invalid-identifier-identifier-r-path-traversal","errorCode":null,"errorMessage":"Invalid identifier {identifier!r}: path traversal detected","messagePattern":"Invalid identifier (.+?): path traversal detected","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/arize/arize_phoenix_client.py","lineNumber":16,"sourceCode":"\"\"\"\nArize Phoenix API client for fetching prompt versions from Arize Phoenix.\n\"\"\"\n\nimport urllib.parse\nfrom typing import Any, Final\n\nfrom litellm.llms.custom_httpx.http_handler import HTTPHandler\n\n\ndef _sanitize_id(identifier: str) -> str:\n    \"\"\"Reject path traversal characters and URL-encode the identifier.\"\"\"\n    if any(c in identifier for c in (\"/\", \"\\\\\", \"#\", \"?\")):\n        raise ValueError(f\"Invalid identifier {identifier!r}: contains disallowed characters\")\n    if \"..\" in identifier:\n        raise ValueError(f\"Invalid identifier {identifier!r}: path traversal detected\")\n    return urllib.parse.quote(identifier, safe=\"\")\n\n\nclass ArizePhoenixClient:\n    \"\"\"\n    Client for interacting with Arize Phoenix API to fetch prompt versions.\n\n    Supports:\n    - Authentication with Bearer tokens\n    - Fetching prompt versions\n    - Direct API base URL configuration\n    \"\"\"\n\n    def __init__(self, api_key: str | None = None, api_base: str | None = None):\n        \"\"\"\n        Initialize the Arize Phoenix client.\n\n        Args:","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/arize/arize_phoenix_client.py#L1-L34","documentation":"Error \"Invalid identifier {identifier!r}: path traversal detected\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/arize/arize_phoenix_client.py:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove '..' or path separators from the identifier; use a plain name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}