OpenClaw: Prevent shell injection in macOS keychain credential write

Description

Summary

On macOS, the Claude CLI keychain credential refresh path constructed a shell command to write the updated JSON blob into Keychain via security add-generic-password -w .... Because OAuth tokens are user-controlled data, this created an OS command injection risk.

The fix avoids invoking a shell by using execFileSync("security", argv) and passing the updated keychain payload as a literal argument.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Platform: macOS only
  • Affected versions: <= 2026.2.13

Fix

  • Patched version: >= 2026.2.14 (next release)
  • Fix PR: #15924
  • Fix commits (merged to main):
  • 9dce3d8bf83f13c067bc3c32291643d2f1f10a06
  • 66d7178f2d6f9d60abad35797f97f3e61389b70c
  • b908388245764fb3586859f44d1dff5372b19caf

Thanks @aether-ai-agent for reporting.

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-02-18 17:39:00 UTC
Updated
2026-02-23 22:28:28 UTC
GitHub reviewed
2026-02-18 17:39:00 UTC
NVD published
2026-02-21

EPSS Score

Score Percentile
0.08% 22.80%

CVSS Scores

Base score Version Severity Vector
7.6 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Credits

  • aether-ai-agent (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm openclaw < 2026.2.14 2026.2.14

References

cvelogic Threat Intelligence