CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-47Q7-97XP-M272

GHSA-47Q7-97XP-M272: Cleartext Credential Exposure via Configuration Persistence in OpenClaw

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 3, 2026·6 min read·21 visits

Executive Summary (TL;DR)

Running maintenance commands like `openclaw doctor` or `update` silently replaces secure environment variable placeholders (e.g., `${KEY}`) in your config file with the actual cleartext secret values, permanently writing them to disk.

A critical information disclosure vulnerability exists in the OpenClaw AI assistant's configuration management subsystem. When processing configuration files that utilize environment variable interpolation (e.g., `${API_KEY}`), certain write operations—such as updates or repairs—inadvertently resolve these references to their runtime values and persist the cleartext secrets back to the disk. This effectively converts ephemeral, secure configuration references into permanent, plaintext credentials stored within `openclaw.json`, significantly increasing the risk of accidental secret leakage via version control or backup mechanisms.

Vulnerability Overview

The OpenClaw personal AI assistant supports a security best practice known as configuration interpolation, allowing users to reference environment variables in their openclaw.json file using the syntax ${VAR_NAME}. This ensures that sensitive secrets, such as LLM provider API keys (OpenAI, Anthropic) or bot tokens, remain in memory or environment files and are never written to static configuration storage.

However, a regression in the configuration I/O logic breaks this security model. When the application performs operations that require reading, modifying, and saving the configuration—specifically during automated updates, interactive configuration (openclaw configure), or self-healing routines (openclaw doctor --fix)—it fails to distinguish between the resolved runtime value and the original configuration source.

Consequently, the application overwrites the user's secure configuration file with the resolved in-memory state. A placeholder like ${OPENAI_API_KEY}, which is safe to check into version control, is replaced by the actual alphanumeric secret key sk-proj-..., which is strictly confidential. This transformation happens silently, often without the user's knowledge, until the file is inspected or inadvertently committed to a public repository.

Technical Root Cause Analysis

The vulnerability resides in the configuration serialization pipeline located in src/config/config-io.ts. The root cause is a lack of separation between the canonical configuration (what is stored on disk) and the effective configuration (what is used in memory).

When OpenClaw initializes, it invokes a loader that parses the JSON file and immediately passes it through a resolution function, resolveConfigEnvVars. This function recursively walks the object tree and substitutes any string matching the pattern ${...} with the corresponding value from process.env. The resulting object is used by the application for all logic.

The critical flaw occurs in the writeConfigFile function. This function accepts the current configuration object state to save changes to disk. Because the application only maintains the resolved state in memory without keeping a reference to the original raw state or a map of interpolated fields, JSON.stringify serializes the actual secret values. The serialization logic assumes that the current value of a field is the desired persistent value, ignoring the fact that the value originated from an ephemeral environment source.

Vulnerable Code Analysis

The following pseudo-code illustrates the logic flow responsible for the vulnerability. The application loads the config, interpolates it immediately, and then writes that interpolated version back to disk during updates.

Vulnerable Logic (src/config/config-io.ts)

// LOAD: Reads JSON and immediately destroys the reference to "${VAR}"
function loadConfig() {
  const raw = fs.readFileSync('openclaw.json', 'utf8');
  const config = JSON.parse(raw);
  // Vulnerability: Original formatting is lost here
  return resolveEnvVars(config);
}
 
// SAVE: Writes the resolved values (secrets) to disk
function saveConfig(updatedConfig) {
  // Vulnerability: Writes "sk-12345..." instead of "${API_KEY}"
  const output = JSON.stringify(updatedConfig, null, 2);
  fs.writeFileSync('openclaw.json', output);
}

Patched Logic (Conceptual)

The fix, introduced in PR #4900, implements a mechanism to preserve the original interpolation syntax. It likely involves tracking which fields contained variables or performing a reverse-lookup against the original raw configuration before saving.

function saveConfig(updatedConfig, originalRawConfig) {
  const outputConfig = clone(updatedConfig);
  
  // FIX: Restore ${VAR} references for fields that haven't changed logically
  for (const key of Object.keys(originalRawConfig)) {
    if (isInterpolated(originalRawConfig[key])) {
       // Revert the resolved value back to the placeholder
       outputConfig[key] = originalRawConfig[key];
    }
  }
  
  fs.writeFileSync('openclaw.json', JSON.stringify(outputConfig, null, 2));
}

Exploitation & Reproduction

Exploitation of this vulnerability is trivial and often accidental, triggered by standard maintenance commands. An attacker with local access could trigger this to persist ephemeral secrets, or a user could trigger it unknowingly.

Reproduction Steps:

  1. Setup: Create an openclaw.json file utilizing environment variable interpolation for a sensitive field.

    {
      "llm": {
        "provider": "anthropic",
        "apiKey": "${ANTHROPIC_API_KEY}"
      }
    }
  2. Environment: Export the corresponding secret in the current shell.

    export ANTHROPIC_API_KEY="sk-ant-api03-sensitive-secret-value"
  3. Trigger: Execute a command that modifies configuration. The doctor command with the --fix flag is a reliable trigger as it attempts to normalize the configuration structure.

    openclaw doctor --fix
  4. Verification: Inspect the file content. The placeholder is gone, replaced by the plaintext secret.

    cat openclaw.json
    # Output: "apiKey": "sk-ant-api03-sensitive-secret-value"

Impact Assessment

The primary impact of this vulnerability is the Unintentional Exposure of Sensitive Information (CWE-200) and Cleartext Storage of Sensitive Information (CWE-312). While the vulnerability requires local execution to trigger, the downstream effects can be severe in DevOps and collaborative environments.

  • Version Control Leakage: Configuration files are frequently checked into Git repositories. If a developer runs a local update and then commits the changes (git commit -am "update config"), they may unknowingly push live production credentials to a shared or public repository.
  • Persistence of Ephemeral Secrets: Security best practices dictate that secrets should exist only in memory or restricted environment files. This vulnerability violates that principle by writing secrets to the filesystem, where they are vulnerable to path traversal attacks, insecure backups, or unauthorized local read access.
  • Silent Failure: The modification happens silently. There is no error message indicating that interpolation has been stripped, meaning the exposure may persist undetected for long periods.

Remediation

Users must upgrade OpenClaw immediately to prevent further exposure. If you have run any maintenance commands on affected versions, your secrets may already be exposed on disk.

Immediate Steps:

  1. Upgrade: Update OpenClaw to version v2026.2.7 or later. This version includes the fix from PR #4900 which correctly handles environment variable preservation.
  2. Audit: Run grep -r "sk-" openclaw.json or manually inspect your configuration file to verify no cleartext secrets are present.
  3. Rotate: If you discover cleartext secrets in your configuration file, assume they are compromised. Revoke the API keys immediately and generate new ones.
  4. Sanitize: Revert the configuration file to use ${VAR} syntax manually.

Long-term Hardening: Ensure that openclaw.json is added to your .gitignore file if it contains any specific local configuration, or strictly use separate environment files (e.g., .env) that are never tracked.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.4/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
EPSS Probability
0.04%

Affected Systems

OpenClaw Personal AI AssistantOpenClaw CLI Tools

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
<= v2026.2.6-3v2026.2.7
AttributeDetail
CWE IDCWE-312
Vulnerability TypeInformation Disclosure
Attack VectorLocal / File System
ImpactConfidentiality Loss
Affected ComponentConfig I/O (openclaw.json)
CVSS Score7.4 (High)

MITRE ATT&CK Mapping

T1552.001Unsecured Credentials: Credentials In Files
Credential Access
CWE-312
Cleartext Storage of Sensitive Information

The application stores sensitive information in cleartext within a resource that might be accessible to another control sphere.

Vulnerability Timeline

Fix PR #4900 Merged
2026-02-07
Patch Release v2026.2.7
2026-02-08

References & Sources

  • [1]GHSA-47Q7-97XP-M272 Advisory
  • [2]PR #4900: Fix config write paths

More Reports

•3 minutes ago•CVE-2026-63188
8.7

CVE-2026-63188: Unauthenticated Directory Traversal in @logto/tunnel

A high-severity path traversal vulnerability exists in the @logto/tunnel npm package (part of the Logto repository) prior to version 0.3.9. Remote unauthenticated attackers can exploit this vulnerability to read arbitrary local files by sending crafted HTTP requests with directory traversal sequences when the static file proxy is active.

Alon Barad
Alon Barad
1 views•7 min read
•about 7 hours ago•CVE-2026-54347
8.7

CVE-2026-54347: Stored Cross-Site Scripting in Froxlor DNS TXT Record Configuration

A critical stored Cross-Site Scripting (XSS) vulnerability was identified in Froxlor server administration software panel before version 2.3.8. Authenticated customers with DNS editor privileges can inject malicious JavaScript into DNS TXT records. Because the application processes these values via a raw formatting callback without context-aware HTML entity encoding, the payload executes in the security context of administrative users who view the affected domain's DNS zones.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 8 hours ago•CVE-2026-54348
7.2

CVE-2026-54348: Second-Order SQL Injection in Froxlor API Layer

An authenticated administrator with privileges to manage admin accounts (such as change_serversettings) can execute arbitrary SQL commands via a second-order SQL injection vulnerability. The flaw resides in Froxlor's administrative API endpoints, specifically during the handling of IP address mapping parameters which are stored as serialized arrays and later interpolated without sanitization into active database queries. This vulnerability allows high-privileged administrative attackers to compromise the database. By injecting a payload into administrative profile metadata, an attacker can extract sensitive credentials, manipulate backend settings, or potentially disrupt database integrity. The vulnerability affects all versions of Froxlor prior to 2.3.8.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 9 hours ago•CVE-2026-54543
5.4

CVE-2026-54543: DNS Resource Record (RR) Injection in Froxlor DomainZones API

CVE-2026-54543 is a DNS Resource Record (RR) Injection vulnerability in Froxlor, an open-source server administration control panel. Prior to version 2.3.8, the DomainZones.add API command failed to perform strict sanitization and validation on the user-controlled record (label) and type parameters before serializing them into BIND-compatible zone files. An authenticated customer with DNS zone management permissions can inject control characters, breaking out of the original record context to define unauthorized resource records within managed zones.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 9 hours ago•CVE-2026-42533
9.2

CVE-2026-42533: NGINX Map Directive and Regex Matching Pre-Auth Heap Buffer Overflow & Info Leak

CVE-2026-42533 is a critical security vulnerability discovered in NGINX Open Source, NGINX Plus, NGINX Ingress Controller, and related products, referred to as the 'Two-Pass Capture-Clobbering' bug. The flaw is situated within NGINX's internal evaluation engine when handling complex variables, exposing a heap-based buffer overflow and information leak when a configuration chains regular expression-based map directives with numbered capture groups. An unauthenticated remote attacker can exploit this weakness by transmitting crafted HTTP requests to trigger remote code execution or defeat ASLR.

Alon Barad
Alon Barad
7 views•7 min read
•about 10 hours ago•CVE-2026-55593
6.5

CVE-2026-55593: Persistent Administrative Hijacking via Cross-Site Request Forgery in Froxlor Ajax Router

Froxlor prior to version 2.3.8 contains a high-severity architectural flaw where the standalone lib/ajax.php entry point bypasses the centralized request validation in lib/init.php. Unauthenticated remote attackers can leverage Cross-Site Request Forgery (CSRF) to induce authenticated administrators to submit forged requests that modify API key whitelists and expiration dates, potentially yielding persistent, out-of-band administrative control.

Amit Schendel
Amit Schendel
6 views•8 min read