Vulnerability in wp-cli/wp-cli (CVE-2021-29504)
Summary
Vulnerability in wp-cli/wp-cli (CVE-2021-29504). Confidential information can be exposed externally. Exploitable via false. Mitigation: upgrade to 2.5.0 or later.
Original description
The description as published by the source.
WP-CLI is the command-line interface for WordPress. An improper error handling in HTTPS requests management in WP-CLI version 0.12.0 and later allows remote attackers able to intercept the communication to remotely disable the certificate verification on WP-CLI side, gaining full control over the communication content, including the ability to impersonate update servers and push malicious updates towards WordPress instances controlled by the vulnerable WP-CLI agent, or push malicious updates toward WP-CLI itself. The vulnerability stems from the fact that the default behavior of WP_CLI\Utils\http_request() when encountering a TLS handshake error is to disable certificate validation and retry the same request. The default behavior has been changed with version 2.5.0 of WP-CLI and the wp-cli/wp-cli framework (via https://github.com/wp-cli/wp-cli/pull/5523) so that the WP_CLI\Utils\http_request() method accepts an $insecure option that is false by default and consequently that a TLS handshake failure is a hard error by default. This new default is a breaking change and ripples through to all consumers of WP_CLI\Utils\http_request(), including those in separate WP-CLI bundled or third-party packages. https://github.com/wp-cli/wp-cli/pull/5523 has also added an --insecure flag to the cli update command to counter this breaking change. There is no direct workaround for the default insecure behavior of wp-cli/wp-cli versions before 2.5.0. The workaround for dealing…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2021-29504 has been found in wp-cli/wp-cli.
Attackers can target a specific entry point like false over the network to misuse the product.
Confidential information can be exposed externally.
What to do: upgrade wp-cli/wp-cli to 2.5.0 or later.
If unsure, ask your IT team or search "wp-cli/wp-cli CVE-2021-29504" on the vendor's site.
CVE-2021-29504 (wp-cli/wp-cli) — CWE-295
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: false
Patched: 2.5.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-295) exists in wp-cli/wp-cli. Attackers reach the vulnerable code path via false without authentication.
Check the vendor advisory for the affected versions of wp-cli/wp-cli. Attack surface: false.
Severity: ?. Confidential information can be exposed externally.
Update to 2.5.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'wp-cli/wp-cli' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'wp-cli/wp-cli' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
wp-cli/wp-cliを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade wp-cli/wp-cli to 2.5.0ステージング環境で 2.5.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory github.com
- advisory github.com
- advisory github.com
- advisory github.com
- advisory github.com
- advisory github.com
- web nvd.nist.gov
- web github.com