{"record":{"id":"f07382259719c5b1","repo":"langchain-ai/langchain","slug":"name-has-been-removed-for-security-reasons-u","errorCode":null,"errorMessage":"'{name}' has been removed for security reasons.\n\nUsage of this utility in environments with user-input paths is a security vulnerability. Out of an abundance of caution, the utility has been removed to prevent possible misuse.","messagePattern":"'(.+?)' has been removed for security reasons\\.\n\nUsage of this utility in environments with user-input paths is a security vulnerability\\. Out of an abundance of caution, the utility has been removed to prevent possible misuse\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/core/langchain_core/utils/image.py","lineNumber":14,"sourceCode":"\"\"\"Utilities for image processing.\"\"\"\n\nfrom typing import Any\n\n\ndef __getattr__(name: str) -> Any:\n    if name in {\"encode_image\", \"image_to_data_url\"}:\n        msg = (\n            f\"'{name}' has been removed for security reasons.\\n\\n\"\n            f\"Usage of this utility in environments with user-input paths is a \"\n            f\"security vulnerability. Out of an abundance of caution, the utility \"\n            f\"has been removed to prevent possible misuse.\"\n        )\n        raise ValueError(msg)\n    raise AttributeError(name)\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/langchain-ai/langchain/blob/e32fa9a52eab3b61ad7a45399bfde59b3e580fc4/libs/core/langchain_core/utils/image.py#L1-L16","documentation":"Error \"'{name}' has been removed for security reasons.\n\nUsage of this utility in environments with user-input paths is a security vulnerability. Out of an abundance of caution, the utility has been removed to prevent possible misuse.\" thrown in langchain-ai/langchain.","triggerScenarios":"Raised unconditionally when a removed image utility (previously usable with user-controlled paths) is called; the utility was removed for security reasons.","commonSituations":"See trigger scenarios.","solutions":["Stop calling the removed utility; load image data yourself from a trusted, validated path and pass the bytes or data URI directly.","Never resolve user-supplied filesystem paths for image loading; accept URLs or in-memory data instead."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e32fa9a52eab3b61ad7a45399bfde59b3e580fc4","analyzedAt":"2026-08-14T18:42:09.092Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}