# CVE-2026-22798: hermes's raw options logging may disclose secrets passed in via subcommand options argument

> Attackers with log file access can read sensitive API tokens and secrets logged in plain text by the hermes tool.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 12 Jan 2026
- **Updated:** 13 Jan 2026
- **Also known as:** GHSA-jm5j-jfrm-hm23, PYSEC-2026-1449

## What is CVE-2026-22798?

CVE-2026-22798 is a medium-severity vulnerability in softwarepub hermes, published on 12 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

hermes is an implementation of the HERMES workflow to automatize software publication with rich metadata. From 0.8.1 to before 0.9.1, hermes subcommands take arbitrary options under the -O argument. These have been logged in raw form. If users provide sensitive data such as API tokens (e.g., via hermes deposit -O invenio_rdm.auth_token SECRET), these are written to the log file in plain text, making them available to whoever can access the log file. This vulnerability is fixed in 0.9.1.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File)

## Which versions are affected by CVE-2026-22798?

3 open source packages ship an affected version, including hermes. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hermes` | PyPI | From 0.8.1 | 0.9.1 |
| `hermes` | PyPI | From 0.8.1 | 0.9.1 |
| `hermes` | PyPI | From 0.8.1 | 0.9.1 |

Products: Software-Metadata.pub Hermes.

## How do I fix CVE-2026-22798?

Upgrade hermes to 0.9.1 or later.

## Is CVE-2026-22798 being exploited?

There is no known exploitation of CVE-2026-22798 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-22798 and fix it if it is affected.

What it is: CVE-2026-22798 is a medium-severity vulnerability in softwarepub hermes, published on 12 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-22798 in the wild and no public exploit code.

Affected packages and fixed versions:
- hermes (PyPI): affected from 0.8.1; fixed in 0.9.1
- hermes (PyPI): affected from 0.8.1; fixed in 0.9.1
- hermes (PyPI): affected from 0.8.1; fixed in 0.9.1

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/CVE-2026-22798/ (Markdown: https://insights.sbomify.com/CVE-2026-22798/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-22798
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-22798
- OSV: https://osv.dev/vulnerability/CVE-2026-22798

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-22798/
Summaries are generated and may contain mistakes; the official description above is the record.
