# GHSA-2xwp-m7mq-7q3r: CLI does not correctly implement strict mode

> The AWS Encryption CLI fails to enforce strict mode, allowing decryption with unauthorized keys, bypassing intended security controls.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Oct 2020

## What is GHSA-2xwp-m7mq-7q3r?

GHSA-2xwp-m7mq-7q3r is a vulnerability in aws-encryption-sdk-cli, published on 28 Oct 2020. 

### Official description

In the affected versions, the AWS Encryption CLI operated in "discovery mode" even when "strict mode" was specified. Although decryption only succeeded if the user had permission to decrypt with at least one of the CMKs, decryption could be successful using a CMK that was not included in the user-defined set when the CLI was operating in "strict mode."

Affected users should upgrade to Encryption CLI v1.8.x or v2.1.x as soon as possible.

## Which versions are affected by GHSA-2xwp-m7mq-7q3r?

4 open source packages ship an affected version, including aws-encryption-sdk-cli.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aws-encryption-sdk-cli` | PyPI | All versions | 1.8.0 |
| `aws-encryption-sdk-cli` | PyPI | All versions | 1.8.0 |
| `aws-encryption-sdk-cli` | PyPI | From 2.0.0 | 2.1.0 |
| `aws-encryption-sdk-cli` | PyPI | From 2.0.0 | 2.1.0 |

## How do I fix GHSA-2xwp-m7mq-7q3r?

Upgrade aws-encryption-sdk-cli to a fixed version for your release line: 1.8.0 or 2.1.0.

## Is GHSA-2xwp-m7mq-7q3r being exploited?

There is no known exploitation of GHSA-2xwp-m7mq-7q3r in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-2xwp-m7mq-7q3r and fix it if it is affected.

What it is: GHSA-2xwp-m7mq-7q3r is a vulnerability in aws-encryption-sdk-cli, published on 28 Oct 2020. 
Exploitation: There is no known exploitation of GHSA-2xwp-m7mq-7q3r in the wild and no public exploit code.

Affected packages and fixed versions:
- aws-encryption-sdk-cli (PyPI): affected all versions; fixed in 1.8.0
- aws-encryption-sdk-cli (PyPI): affected all versions; fixed in 1.8.0
- aws-encryption-sdk-cli (PyPI): affected from 2.0.0; fixed in 2.1.0
- aws-encryption-sdk-cli (PyPI): affected from 2.0.0; fixed in 2.1.0

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-2xwp-m7mq-7q3r/ (Markdown: https://insights.sbomify.com/GHSA-2xwp-m7mq-7q3r/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-2xwp-m7mq-7q3r

---
From sbomify Insights: https://insights.sbomify.com/GHSA-2xwp-m7mq-7q3r/
Summaries are generated and may contain mistakes; the official description above is the record.
