SkillTotal

Is litellm safe?

No malicious indicators - exposed secrets found
Notable — review in context (capabilities are not malware):
  • Python dynamic code execution
  • Python shell/command execution
  • Embedded secret / credential

What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.

litellm is a PyPI package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 1 risky construct is reported for review. It can: delegated authentication, dynamic code execution, filesystem read, filesystem write, mcp tools detected, network egress, scoped identity and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 10/100 (low).

litellm 1.104.0

python_package · pypi:litellm
LOW
10
/ 100 risk score
Snapshot · scanned Oct 5, 2026 · litellm@1.104.0 · engine 0.54.0 / ruleset 61

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of litellm's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
delegated authenticationdynamic code executionfilesystem readfilesystem writemcp tools detectednetwork egressscoped identityshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Tool surface
Tool Usage
Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication
Network exposure
Interaction & Communication
Embedded credential access
Tool Execution Context / Agent Service Identity
Delegated authentication
Tool Execution Context / User Delegated Credentials
Scoped / least-privilege identity
Tool Execution Context / Least-Privilege Service Identity

Findings (11)

HIGHPython dynamic code executionST-DYN-PY

The code turns strings into live code at runtime (eval / new Function / exec).

Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.

Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.

HIGHEmbedded secret / credentialnot scoredST-SECRET-EMBEDDED

A hardcoded credential (API key, token, or private key) is shipped in the code.

"out of URLs and access logs. Example api_key='d534…[redacted, 64 chars]'"

Why it matters: Anyone who gets the package gets the secret — rotate it and load secrets at runtime instead.

Fix: Remove the secret from the code, rotate it immediately, and load credentials from the environment or a secrets manager at runtime.

HIGHPython shell/command executionST-SHELL-PY

The component can run operating-system commands or spawn processes.

subprocess.check_call([sys.executable, "-m", "pip", "install", "supabase"])
subprocess.check_call([sys.executable, "-m", "pip", "install", "sentry_sdk"])
subprocess.check_call([sys.executable, "-m", "pip", "install", "slack_bolt"])
return subprocess.run(command, env=dict(env), check=False).returncode
return subprocess.Popen(
            [
                sys.executable,
                "-m",
                "litellm.proxy.proxy_cli",
                "--config",
                str(config_path),
                "--port", …
result: Final = subprocess.run(("codex", "--version"), capture_output=True, text=True, timeout=5, check=False)
output: Final = subprocess.run(
            (binary, "--version"), capture_output=True, text=True, check=False, timeout=10
        ).stdout
process: Final = subprocess.Popen(self.argv)
result: Final = subprocess.run(resolve_prisma_argv(("prisma", "generate")), capture_output=True, text=True)
process: Final = subprocess.Popen(
        (
            sys.executable,
            "-m",
            "litellm.proxy.prometheus_metrics_server",
            "--host",
            host,
            "--port",
            str(port), …
subprocess.Popen(command, stdout=devnull, stderr=devnull)
subprocess.Popen(command, stdout=devnull, stderr=devnull)

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; avoid shell=True.

MEDIUMServer bound to all network interfacesST-EXPOSE-BIND

A server is bound to all network interfaces (0.0.0.0), not just your own machine.

_IPV4_LOCAL_ADDRESS: Final = "0.0.0.0"
- if litellm.force_ipv4 is True, it will return AsyncHTTPTransport with local_address="0.0.0.0"
"local_addr": ("0.0.0.0", 0) if litellm.force_ipv4 else None,
- If force_ipv4 is True, it will create an AsyncHTTPTransport with local_address set to "0.0.0.0"
``python -m litellm.proxy.prometheus_metrics_server --host 0.0.0.0 --port 4001``.
_WILDCARD_TO_LOOPBACK: Final = MappingProxyType({"0.0.0.0": "127.0.0.1", "::": "::1"})
parser.add_argument("--host", default="0.0.0.0")
@click.option("--host", default="0.0.0.0", help="Host for the server to listen on.", envvar="HOST")

Why it matters: Without authentication, other hosts on the network can reach it.

Fix: Bind to 127.0.0.1 for local-only use, or require authentication and restrict access if remote exposure is intended.

MEDIUMPython filesystem readST-FS-PY-READ

The component reads files from disk.

files("litellm").joinpath("anthropic_beta_headers_config.json").read_text(encoding="utf-8")
with open("user_cost.json", "r") as json_file:
content: Final = file_path.read_text(encoding="utf-8")
content: Final = file_path.read_text(encoding="utf-8")
with open(str(file_content_obj), "rb") as f:
raw: Final = Path(get_cli_token_file_path()).read_text()
content: Final = json.loads(files("litellm").joinpath("blog_posts.json").read_text(encoding="utf-8"))
return files("litellm").joinpath("model_prices_and_context_window_backup.json").read_bytes()
return HuggingFaceTokenizer.from_str(Path(path).read_text(encoding="utf-8"))
with open(web_identity_token_file, "r") as f:
with open(str(file_content), "rb") as f:
with open(str(file_content), "rb") as f:
with open(self.auth_file, "r") as f:
with open(self.access_token_file, "r") as f:

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

MEDIUMPython filesystem write/deleteST-FS-PY-WRITE

The component writes or deletes files on disk.

with open("user_cost.json", "w") as json_file:
Path(path).write_text(self.to_str(pretty), encoding="utf-8")
with open(self.auth_file, "w") as f:
with open(self.access_token_file, "w") as f:
with open(self.api_key_file, "w") as f:
with open(cert_path, "w") as f:
with open(key_path, "w") as f:
snapshot_file.write_text(json.dumps(result.fragments, indent=2, sort_keys=True) + "\n")
path.write_text(report, encoding="utf-8")
path.write_text(SLASH_COMMAND_BODY, encoding="utf-8")
with open(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600), "w", encoding="utf-8") as handle:
shutil.copyfile(plan.ca_source, ca_path)
register_exit_hook(_only_in_this_process(lambda: shutil.rmtree(runtime_dir, ignore_errors=True)))
with open(path, "w", encoding="utf-8") as handle:

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

MEDIUMNode.js network egressST-NET-NODE

The component makes outbound network requests.

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,312130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(519455),o=e.i(515288),s=e.i(793479),r=e.i(110204),n=e.i(571303),i= …
`;t.document.write(a),t.document.close(),t.onload=()=>{t.print()}})(e),children:[(0,t.jsx)(G.FileText,{}),"Export as PDF"]}),(0,t.jsxs)(U.DropdownMenuItem,{onClick:()=>(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cos …
}'`}),(0,t.jsx)("p",{className:"mb-2 mt-3 text-xs text-muted-foreground",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children: …
}`,em=({visible:e,initialJson:r,onSave:n,onClose:a})=>{let[l,o]=(0,s.useState)(r||ed),[i,c]=(0,s.useState)(null),d=()=>{c(null),a()};return(0,t.jsx)(q.Dialog,{open:e,onOpenChange:e=>!e&&d(),children:(0,t.jsxs)(q.DialogContent,{className:"ma …
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 1 …

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

MEDIUMPython network egressST-NET-PY

The component makes outbound network requests.

self.response = response or httpx.Response(
            status_code=self.status_code,
            request=httpx.Request(method="POST", url="https://litellm.ai"),
        )
request=httpx.Request(method="POST", url="https://litellm.ai"),
response: Final = httpx.get(url, timeout=timeout)
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="delete_assistant", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="delete_assistant", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
response=httpx.Response(
                status_code=400,
                content="Unsupported provider",
                request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),
            ),
request=httpx.Request(method="create_thread", url="https://github.com/BerriAI/litellm"),

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

LOWDelegated authentication (OAuth 2.0 / OIDC)ST-AUTH-DELEGATED

An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (25 occurrence(s) shown as evidence).

id_token: Final = auth_data.get("id_token")
derived: Final = self._extract_account_id(_optional_str(id_token or access_token))
id_token: Final = _optional_str(data.get("id_token"))
if not access_token or not refresh_token or not id_token:
id_token: Final = _optional_str(data.get("id_token"))
if not access_token or not id_token:
id_token: Final = tokens.get("id_token")
account_id: Final = self._extract_account_id(id_token or access_token)
XAI_OAUTH_DISCOVERY_URL: Final = f"{XAI_OAUTH_ISSUER}/.well-known/openid-configuration"
id_token: ReadOnly[str | None]
id_token: NotRequired[ReadOnly[str | None]]
authorization_endpoint: NotRequired[ReadOnly[str]]
authorization_endpoint=discovery["authorization_endpoint"],
"grant_type": "authorization_code",
authorization_endpoint: Final = data.get("authorization_endpoint")
if not authorization_endpoint or not token_endpoint:
"authorization_endpoint": self._validate_xai_endpoint(authorization_endpoint),
authorization_endpoint: str,
return f"{authorization_endpoint}?{urlencode(params)}"
"id_token": token_payload.get("id_token"),

Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.

LOWScoped / least-privilege identityST-AUTH-SCOPED

A short-lived, scoped, assumed identity was detected — an STS AssumeRole / session token, a cloud managed or workload identity, an impersonated service account, a projected Kubernetes service-account token, or a dynamic-secret broker. Tools authenticate with a narrowly-scoped credential that expires, rather than a long-lived embedded service credential. (25 occurrence(s) shown as evidence).

DefaultAzureCredential,
ManagedIdentityCredential,
return ManagedIdentityCredential(client_id=_client_id)
return DefaultAzureCredential()
from azure.identity import DefaultAzureCredential
DefaultAzureCredential as AsyncDefaultAzureCredential,
credential=DefaultAzureCredential(),
"""Call STS AssumeRole and return temporary credentials."""
sts_response: Final = sts_client.assume_role(
# Try to get token provider from service principal or DefaultAzureCredential
"Using Azure AD token provider based on Service Principal with Secret workflow or DefaultAzureCredential for Azure Auth"
# try to get DefaultAzureCredential provider
Try to get DefaultAzureCredential provider
Token provider callable if DefaultAzureCredential is enabled and available, None otherwise
verbose_logger.debug("Attempting to use DefaultAzureCredential for Azure Auth")
azure_credential=AzureCredentialType.DefaultAzureCredential,
verbose_logger.debug("Successfully obtained Azure AD token provider using DefaultAzureCredential")
verbose_logger.debug("DefaultAzureCredential failed: %s", e)
DefaultAzureCredential source) and the token is minted automatically
f"AZURE_CLIENT_SECRET / AZURE_TENANT_ID or any DefaultAzureCredential source) "
federated token, username/password, or `DefaultAzureCredential` / managed identity.
# ``_get_default_ttl_for_boto3_credentials`` (~59 minutes); AssumeRole STS credentials expire with
``_auth_with_env_vars`` (including when skipping AssumeRole because the runtime identity
non-refreshable ``Credentials`` cached ~59 min, inside the 3600s STS session), and AssumeRole

Fix: A scoped, short-lived identity is the smallest-blast-radius execution context. Confirm the assumed role / requested scope grants only the permissions the tool needs, and that the token lifetime is minimal.

LOWMCP tool surface detectedST-MCP-DETECTED

An MCP tool surface (manifest or tool definitions) was found.

server.add_request_handler("tools/list", PaginatedRequestParams, handle_list_tools)
server.add_request_handler("tools/call", CallToolRequestParams, mcp_server_tool_call)

Why it matters: Just context — review which tools it offers and their permissions.

Fix: Review the declared MCP tools and their permissions.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in litellm.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →