CVE-2026-22798

CVE-2026-22798 is a medium-severity security vulnerability in hermes (pip), affecting versions >= 0.8.1, <= 0.9.0. It is fixed in 0.9.1.

Summary

Thanks, @thunze for reporting this!

hermes subcommands take arbitrary options under the -O argument. These have been logged in raw form since https://github.com/softwarepub/hermes/commit/7f64f102e916c76dc44404b77ab2a80f5a4e59b1 in: https://github.com/softwarepub/hermes/blob/3a92f42b2b976fdbc2c49a621de6d665364a7cee/src/hermes/commands/cli.py#L66

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.

Workarounds

Upgrade to hermes >= 0.9.1.

Impact

As currently, hermes.log is not yet uploaded automatically as an artifact in CI, this vuln impacts:

  • local users working on shared access computers, where logs may be written to a commonly accessible file system
  • CI users whose CI logs are accessible to others, e.g., through group or organization rights

Potentially, if the changes merged from https://github.com/softwarepub/ci-templates/pull/13 are merged into ci-templates via https://github.com/softwarepub/ci-templates/pull/14, this would automate the disclosure of Invenio auth tokens at least for all CI runs against Invenio instances!

CVE-2026-22798 has a CVSS score of 5.9 (Medium). The vector is requires local access, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.9.1); upgrading removes the vulnerable code path.

Affected versions

hermes (>= 0.8.1, <= 0.9.0)

Security releases

hermes → 0.9.1 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

This has been patched in hermes 0.9.1 by masking all values passed using -O.

Frequently Asked Questions

  1. What is CVE-2026-22798? CVE-2026-22798 is a medium-severity security vulnerability in hermes (pip), affecting versions >= 0.8.1, <= 0.9.0. It is fixed in 0.9.1.
  2. How severe is CVE-2026-22798? CVE-2026-22798 has a CVSS score of 5.9 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of hermes are affected by CVE-2026-22798? hermes (pip) versions >= 0.8.1, <= 0.9.0 is affected.
  4. Is there a fix for CVE-2026-22798? Yes. CVE-2026-22798 is fixed in 0.9.1. Upgrade to this version or later.
  5. Is CVE-2026-22798 exploitable, and should I be worried? Whether CVE-2026-22798 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-22798 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-22798? Upgrade hermes to 0.9.1 or later.

Other vulnerabilities in hermes

Stop the waste.
Protect your environment with Kodem.