# GHSA-2mc2-g238-722j: OpenClaw affected by iMessage remote attachment SCP hardening (strict host-key checks and remoteHost validation)

> OpenClaw allows MITM attacks during iMessage attachment fetches due to weak SSH host key validation and unvalidated remote host tokens.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2026

## What is GHSA-2mc2-g238-722j?

GHSA-2mc2-g238-722j is a vulnerability in openclaw, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

## Summary

Remote iMessage attachment fetches used SCP with trust-on-first-use host-key behavior and accepted unvalidated remote host tokens.

Before the fix:
- SCP used `StrictHostKeyChecking=accept-new` in the remote attachment path.
- `channels.imessage.remoteHost` was not validated as a strict SSH host token.

## Impact

In remote iMessage deployments that use SCP attachment fetching, a first-connection MITM/DNS-poisoning scenario could cause the wrong host key to be trusted. Unsafe remote host token values could also alter SCP argument semantics.

## Affected Packages / Versions

- Package: `openclaw` (npm)
- Latest published npm version currently affected: `2026.2.17`
- Vulnerable range (structured field): `<= 2026.2.17`
- Patched version (pre-set for next release): `>= 2026.2.19`

## Fix

The fix hardens remote attachment SSH/SCP handling by:
- requiring `StrictHostKeyChecking=yes` for SCP and SSH tunnel paths,
- adding strict `remoteHost` normalization/validation,
- adding `--` argument barrier for SCP remote source parsing,
- validating `channels.imessage.remoteHost` in config schema,
- rejecting unsafe auto-detected host tokens at runtime.

## Fix Commit(s)

- Pushed to `main`: 49d0def6d1e88f002026b1d2a35aa615d48a751a

OpenClaw thanks @allsmog for reporting.

## Which versions are affected by GHSA-2mc2-g238-722j?

2 open source packages ship an affected version, including openclaw.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openclaw` | npm | All versions | 2026.2.19 |
| `openclaw` | npm | All versions | 2026.2.19 |

## How do I fix GHSA-2mc2-g238-722j?

Upgrade openclaw to 2026.2.19 or later.

## Is GHSA-2mc2-g238-722j being exploited?

There is no known exploitation of GHSA-2mc2-g238-722j in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-2mc2-g238-722j and fix it if it is affected.

What it is: GHSA-2mc2-g238-722j is a vulnerability in openclaw, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-2mc2-g238-722j in the wild and no public exploit code.

Affected packages and fixed versions:
- openclaw (npm): affected all versions; fixed in 2026.2.19
- openclaw (npm): affected all versions; fixed in 2026.2.19

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-2mc2-g238-722j/ (Markdown: https://insights.sbomify.com/GHSA-2mc2-g238-722j/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-2mc2-g238-722j

---
From sbomify Insights: https://insights.sbomify.com/GHSA-2mc2-g238-722j/
Summaries are generated and may contain mistakes; the official description above is the record.
