Back to Intelligence

llm-anthropic 0.31 Release: Securing Claude Fable 5.2 and Mythos 5.2 in Enterprise AI Pipelines

SA
Security Arsenal Team
November 9, 2026
9 min read

The release of llm-anthropic 0.31 this week introduces immediate support for Anthropic's newly launched Claude Fable 5.2 and Claude Mythos 5.2 models. While this update enables developers to leverage cutting-edge reasoning capabilities across five distinct levels—from low to max—it simultaneously expands the enterprise attack surface for API key exposure, unauthorized model access, and supply chain risks within AI pipelines.

For security operations centers (SOCs) and detection engineers, this release is not merely a version bump; it represents a critical junction where development velocity intersects with identity and access management (IAM) challenges. The llm CLI tool's pattern of storing API keys locally and executing arbitrary prompts creates high-value targets for credential harvesting and unauthorized AI resource consumption. As organizations rush to integrate these 5.2-series models into production workflows, defenders must establish visibility into how these tools are configured, where keys are stored, and how model invocations are logged.

Technical Analysis

Affected Components and Architecture

llm-anthropic 0.31 is a plugin for Simon Willison's llm CLI utility, designed to interface with Anthropic's API endpoints. The plugin facilitates:

  • Model Invocation: Direct prompting of Claude Fable 5.2 and Mythos 5.2 via command line
  • Reasoning Level Configuration: Support for five reasoning tiers (low, medium, high, xhigh, max), which may affect token consumption and cost attribution
  • Key Management: Local storage of Anthropic API keys via llm keys set anthropic

The tool is typically installed via uv tool install llm and llm install llm-anthropic, placing it within the Python ecosystem supply chain. This installation method, while convenient, introduces risks if package integrity is compromised or if developers inadvertently install malicious lookalike packages.

Threat Surface Analysis

From a defensive perspective, the primary risks associated with this release include:

  1. Credential Exposure: The llm keys set command stores API keys in plaintext or weakly protected local storage (typically ~/.config/llm/keys.json or platform-specific equivalents). These keys provide full access to Anthropic API resources, including the ability to incur significant compute charges and access proprietary model capabilities.

  2. Unauthorized Model Access: The introduction of Fable 5.2 and Mythos 5.2 may tempt developers to test these models using corporate API keys from unmanaged devices or personal accounts, creating shadow IT scenarios and data exfiltration risks.

  3. Supply Chain Risks: The uv tool install vector, while secure when used correctly, requires validation of package signatures and source repositories. Malicious typosquatting of llm-anthropic or compromised PyPI packages could lead to credential theft or code execution.

  4. Cost and Resource Abuse: The max reasoning level in Fable 5.2 likely consumes significantly more tokens than previous tiers. Without proper monitoring, compromised or misused API keys could result in substantial financial impact before detection.

Exploitation Status

This is a legitimate software release from a reputable developer (Simon Willison). There is no known malicious exploitation of version 0.31 itself at the time of publication. However, the operational security risks described above are actively exploited in the wild—attackers routinely target exposed API keys in configuration files, and AI service abuse is a growing trend in cloud compromise scenarios.

Detection & Response

Sigma Rules

The following Sigma rules detect suspicious usage patterns of the llm CLI tool and potential API key exposure:

YAML
---
title: LLM CLI Tool Anthropic Key Configuration
description: Detects execution of llm CLI commands related to Anthropic API key configuration, which may indicate legitimate setup or potential credential exposure.
author: Security Arsenal
date: 2026/11/09
references:
  - https://simonwillison.net/2026/Nov/9/llm-anthropic/
  - https://attack.mitre.org/techniques/T1552/001/
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    Image|endswith:
      - '\llm.exe'
      - '\uv.exe'
  selection_cli:
    CommandLine|contains:
      - 'keys set anthropic'
      - 'llm install llm-anthropic'
      - 'claude-fable-5.2'
      - 'claude-mythos-5.2'
  condition: selection_img and selection_cli
falsepositives:
  - Legitimate developer activity
  - AI/ML engineering workflows
level: medium
---
title: Anthropic API Key File Access
description: Detects file access to LLM CLI configuration files containing Anthropic API keys, which may indicate credential harvesting attempts.
author: Security Arsenal
date: 2026/11/09
references:
  - https://attack.mitre.org/techniques/T1552/001/
logsource:
  category: file_event
  product: windows
detection:
  selection_path:
    TargetFilename|contains:
      - '\.config\llm\keys.json'
      - '\llm\keys.json'
  selection_proc:
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\python.exe'
  condition: selection_path and selection_proc
falsepositives:
  - Legitimate llm CLI operations
  - Backup software accessing config directories
level: high

KQL (Microsoft Sentinel / Defender)

Use this query to hunt for LLM CLI tool execution and API key configuration activities across your environment:

KQL — Microsoft Sentinel / Defender
// Hunt for llm CLI usage and Anthropic model invocations
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName in~ ("llm.exe", "uv.exe", "python.exe")
| where ProcessCommandLine has_any (
    "keys set anthropic",
    "claude-fable-5.2",
    "claude-mythos-5.2",
    "llm-anthropic"
)
| project 
    TimeGenerated,
    DeviceName,
    InitiatingProcessAccountName,
    FileName,
    ProcessCommandLine,
    InitiatingProcessCommandLine,
    SHA256
| extend RiskIndicator = case(
    ProcessCommandLine has "keys set", "API Key Configuration",
    ProcessCommandLine has "fable-5.2", "New Model Usage",
    ProcessCommandLine has "mythos-5.2", "New Model Usage",
    "Installation"
)
| sort by TimeGenerated desc

Velociraptor VQL

Deploy this artifact to hunt for LLM configuration files and process execution across your Windows and Linux endpoints:

VQL — Velociraptor
-- Hunt for LLM CLI tool artifacts and Anthropic API key storage
SELECT 
    Pid,
    Name,
    CommandLine,
    Exe,
    Username,
    CreateTime,
    FileSize,
    Hash
FROM pslist()
WHERE CommandLine =~ 'llm.*(anthropic|fable|mythos)'
   OR CommandLine =~ 'uv tool install llm'
   OR Exe =~ 'llm\.exe$'

-- Check for key storage locations
SELECT 
    FullPath,
    Size,
    Mtime,
    Mode
FROM glob(
    globs=[
        'C:\\Users\\*\\.config\\llm\\keys.json',
        '/home/*/.config/llm/keys.json',
        '/root/.config/llm/keys.json'
    ]
)
WHERE Size > 0

Remediation Script

Use this PowerShell script to audit and secure LLM CLI installations and detect exposed API keys:

PowerShell
#Requires -RunAsAdministrator
# LLM CLI Security Audit and Hardening Script
# Run this script to detect llm installations and secure API key storage

$AuditLog = @()

function Write-SecurityLog {
    param($Message, $Severity = "INFO")
    $LogEntry = "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] [$Severity] $Message"
    $AuditLog += $LogEntry
    Write-Host $LogEntry
}

# Check for llm CLI installations
Write-SecurityLog "Scanning for llm CLI installations..."
$llmPaths = @(
    "$env:USERPROFILE\.local\bin\llm.exe",
    "$env:LOCALAPPDATA\Programs\llm\llm.exe",
    "$env:USERPROFILE\scoop\shims\llm.exe"
)

$llmInstalled = $false
foreach ($path in $llmPaths) {
    if (Test-Path $path) {
        Write-SecurityLog "Found llm installation at: $path" "WARNING"
        $llmInstalled = $true
        
        # Check for Anthropic plugin
        $pluginCheck = & $path plugins 2>$null | Select-String "anthropic"
        if ($pluginCheck) {
            Write-SecurityLog "llm-anthropic plugin detected" "WARNING"
        }
    }
}

# Audit API key storage locations
Write-SecurityLog "Checking for exposed API keys..."
$KeyPaths = @(
    "$env:USERPROFILE\.config\llm\keys.json",
    "$env:APPDATA\llm\keys.json"
)

foreach ($keyPath in $KeyPaths) {
    if (Test-Path $keyPath) {
        $FileInfo = Get-Item $keyPath
        $ACL = Get-Acl $keyPath
        
        Write-SecurityLog "API key file found: $keyPath" "CRITICAL"
        Write-SecurityLog "  Last Modified: $($FileInfo.LastWriteTime)"
        Write-SecurityLog "  File Size: $($FileInfo.Length) bytes"
        
        # Check permissions
        $AccessRules = $ACL.Access | Where-Object { $_.IdentityReference -notmatch "SYSTEM|Administrators|$env:USERNAME" }
        if ($AccessRules) {
            Write-SecurityLog "  WARNING: Excessive permissions detected on key file!" "CRITICAL"
            Write-SecurityLog "  Consider running: icacls '$keyPath' /inheritance:r /grant:r '$env:USERNAME:F'"
        }
        
        # Attempt to detect key format (safely)
        try {
            $KeyContent = Get-Content $keyPath -Raw | ConvertFrom-Json
            if ($KeyContent.anthropic) {
                Write-SecurityLog "  Anthropic API key detected in file" "CRITICAL"
                Write-SecurityLog "  Recommendation: Rotate this key immediately if system is not fully trusted"
            }
        } catch {
            Write-SecurityLog "  Could not parse key file (may be encrypted or corrupted)"
        }
    }
}

# Check for recent model usage in event logs (if audit logging enabled)
Write-SecurityLog "Checking for recent llm process execution..."
$RecentProcesses = Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4688; StartTime=(Get-Date).AddDays(-7)} -ErrorAction SilentlyContinue | 
    Where-Object { $_.Message -match "llm.*(anthropic|fable|mythos)" }

if ($RecentProcesses) {
    Write-SecurityLog "Found $($RecentProcesses.Count) recent llm process executions" "WARNING"
    foreach ($proc in $RecentProcesses | Select-Object -First 5) {
        Write-SecurityLog "  $($proc.TimeCreated): $($proc.Message.Substring(0, [Math]::Min(200, $proc.Message.Length)))"
    }
}

# Hardening recommendations
Write-SecurityLog "`n=== HARDENING RECOMMENDATIONS ===" "INFO"
Write-SecurityLog "1. Move API keys to environment variables or Azure Key Vault"
Write-SecurityLog "2. Implement Just-In-Time (JIT) access for Anthropic API keys"
Write-SecurityLog "3. Enable Anthropic API usage alerts for anomalous spending"
Write-SecurityLog "4. Restrict llm CLI execution to authorized developers via AppLocker"
Write-SecurityLog "5. Monitor for claude-fable-5.2 and claude-mythos-5.2 usage in proxy logs"

# Export audit log
$AuditLog | Out-File -FilePath "LLM_Security_Audit_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"
Write-SecurityLog "Audit complete. Log saved to: LLM_Security_Audit_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"

Remediation

Immediate Actions

  1. Inventory AI Tooling: Identify all installations of llm CLI and the llm-anthropic plugin across developer workstations and build servers. Use the detection queries above to establish a baseline.

  2. API Key Rotation: If you discover Anthropic API keys stored in ~/.config/llm/keys.json on shared or unmanaged systems, rotate these keys immediately via the Anthropic Console. Treat any key stored on a non-persistent or multi-user system as potentially compromised.

  3. Access Control: Implement strict file permissions on LLM configuration directories:

    • Windows: Use icacls to restrict access to the user profile only
    • Linux/macOS: Ensure chmod 600 on ~/.config/llm/keys.json
  4. Cost Monitoring: Configure budget alerts in the Anthropic Console specifically for the new Fable 5.2 and Mythos 5.2 models. Set thresholds for the max reasoning tier, which may incur significant costs.

Strategic Hardening

  1. Centralized Key Management: Migrate from local llm keys set storage to enterprise secrets management solutions (Azure Key Vault, HashiCorp Vault, AWS Secrets Manager). Use the LLM_ANTHROPIC_KEY environment variable injected via secure CI/CD pipelines rather than persistent local storage.

  2. Network Controls: Restrict outbound HTTPS traffic to Anthropic API endpoints (api.anthropic.com) to authorized developer subnets and service accounts only. Implement TLS inspection for AI API traffic to detect data exfiltration attempts.

  3. Application Control: Deploy AppLocker or WDAC policies to control execution of llm.exe and uv.exe to approved development teams. Consider blocking execution from temporary directories or user-writable paths.

  4. Model Governance: Establish an approved model registry that explicitly authorizes or restricts access to Fable 5.2 and Mythos 5.2 based on data classification requirements. The max reasoning level should require additional approval for production workloads.

Verification

After implementing controls, verify that:

  • No API keys are stored in plaintext configuration files on endpoints
  • All llm CLI executions are logged to your SIEM
  • Anthropic API usage alerts are configured for cost anomalies
  • Only authorized models (potentially excluding 5.2 series until vetted) are invocable from production systems

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.