CVE-2026-55164: Lemur Lemur User-update Path Stores Plaintext Vulnerability

MODERATE
Advisory Identifier: GHSA-q437-g7fv-2jvv
CVSS 4.9
CWE-256
Published
Advisory Summary

CVE-2026-55164 is a MODERATE (CVSS 4.9) lemur user-update path stores plaintext vulnerability (CWE-256: Plaintext Storage of a Password) affecting Lemur libraries in the PyPI ecosystem. The issue involves lemur user-update path stores plaintext passwords. Remediation is available by upgrading affected packages to version 1.9.2.

CVE-2026-55164 at a Glance

CVE Identifier CVE-2026-55164
GHSA Identifier GHSA-q437-g7fv-2jvv
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-256: Plaintext Storage of a Password
Affected Product Lemur
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-55164

To remediate this vulnerability, upgrade all affected Lemur dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

lemur fixed: 1.9.2
pip install lemur>=1.9.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show lemur

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-55164, inspect your installed packages using pip:

pip show lemur

Analyze the terminal output to locate any version of Lemur in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.2), your application is affected.

Note: The pip show lemur command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-256: Plaintext Storage of a Password, where the product stores a password in plaintext within resources such as memory or files. In Lemur, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `lemur.users.service.update()` writes a user's new password as plaintext to the `users.password` column. The `User` model wires bcrypt hashing to SQLAlchemy's `before_insert` event but registers no equivalent listener for `before_update`, and `service.update()` does not call `user.hash_password()` after assigning the new value. Every password change performed through the admin-gated `PUT /api/1/users/<id>` endpoint persists the user's password to the database in cleartext. ## Root Cause `lemur/users/models.py`: ```python # line 38 class User(BaseModel): __tablename__ = "users" id = Column(Integer, primary_key=True) password = Column(String(128)) # plain column, no setter, no Vault descriptor # line 74 def hash_password(self): if self.password: self.password = bcrypt.generate_password_hash(self.password).decode("utf-8") # line 111 listen(User, "before_insert", hash_password) # only before_insert is wired ``` `lemur/users/service.py`: ```python # line 46 def update(user_id, username, email, active, profile_picture, roles, password=None): ... user = get(user_id) user.username = username user.email = email user.active = active user.profile_picture = profile_picture if password: user.password = password # raw assignment update_roles(user, roles) return database.update(user) # commits, no hashing ``` No `before_update` listener exists. `User.password` is a plain `Column(String(128))` with no property setter that hashes on assignment. The bcrypt code path is bypassed entirely on every UPDATE statement that touches this column. ## Affected Endpoints | Method | Path | Source | |---|---|---| | PUT | /api/1/users/`<id>` | lemur/users/views.py:274 (gated by `@admin_permission.require`) | `lemur/auth/views.py:323` also calls `user_service.update()` during SSO/OAuth login, but passes only six positional arguments. `password` defaults to `None` on that path and the `if password:` guard short-circuits. The bug is triggered only through the admin-only PUT handler. ## Impact When an administrator changes a user's password via `PUT /api/1/users/<id>`, the cleartext password is persisted to `users.password`. Subsequent login attempts for that user will fail (`check_password` calls `bcrypt.check_password_hash` against an unhashed value), pushing operators toward workarounds. The more serious consequence is a defense-in-depth bypass. Bcrypt is the protection that prevents a database compromise from yielding usable credentials. With plaintext rows present, an attacker who exfiltrates the `users` table, a backup, a read replica, or query logs obtains directly usable login credentials — no offline cracking required. Because users reuse passwords across services, the blast radius extends beyond Lemur. The bug specifically affects admin-driven password resets, which are the normal post-incident workflow and exactly when plaintext storage is most harmful. ## Steps to Reproduce 1. Install Lemur with default config. Create an admin user and a target user 'alice' (created via the standard flow, password will be hashed correctly on insert). 2. Verify the initial hash: psql lemur -c "SELECT password FROM users WHERE username='alice';" # Output: $2b$12$N9Q... (bcrypt hash, as expected) 3. As admin, change alice's password via the API: curl -X PUT https://lemur.local/api/1/users/<alice_id> \ -H "Authorization: Bearer <admin_jwt>" \ -H "Content-Type: application/json" \ -d '{ "username": "alice", "email": "alice@example.com", "active": true, "profile_picture": null, "roles": [{"name": "operator"}], "password": "ProofOfConcept_2026" }' 4. Read the column again: psql lemur -c "SELECT password FROM users WHERE username='alice';" # Output: ProofOfConcept_2026 ← plaintext, not hashed 5. Confirm the failure mode: 'alice' can no longer log in with 'ProofOfConcept_2026' because check_password runs bcrypt.check_password_hash() against the cleartext column. ## Remediation Register the listener for both events: ```python # lemur/users/models.py listen(User, "before_insert", hash_password) listen(User, "before_update", hash_password) ``` Alternative, equivalent fix in the service layer: ```python # lemur/users/service.py, in update() if password: user.password = password user.hash_password() ``` The listener fix is preferred because it closes the gap for any future code path that mutates `user.password`. A one-time migration is recommended to detect and re-hash any rows already stored in cleartext. Bcrypt hashes begin with `$2b$`, `$2a$`, or `$2y$`. Any cleartext credential should be treated as **compromised** — rotate it, do not just re-hash it — since it has been at rest in plaintext and may exist in backups, audit logs, and replicas.

CVE-2026-55164 Affected Lemur Versions

1 component(s)
Fixed Versions:
1.9.2
Product / Package Ecosystem Affected Versions Fixed Version
lemur
PyPI
< 1.9.2
1.9.2

References

Frequently Asked Questions

What is CVE-2026-55164?
CVE-2026-55164 is a security vulnerability in Lemur involving Lemur user-update path stores plaintext passwords under CWE-256: Plaintext Storage of a Password.
Which Lemur versions are affected?
Affected versions include releases prior to 1.9.2 across affected packages: lemur.
What version fixes CVE-2026-55164?
Upgrading to 1.9.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lemur affected?
Yes, lemur is affected in releases prior to 1.9.2. Upgrade your dependency to 1.9.2 or later.
What is the CVSS score of CVE-2026-55164?
CVE-2026-55164 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-55164?
CVE-2026-55164 is classified under CWE-256: Plaintext Storage of a Password (The product stores a password in plaintext within resources such as memory or files.).
How can I check PyPI dependencies for CVE-2026-55164?
Run the dependency tree command: 'pip show lemur'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q437-g7fv-2jvv",
  "modified" : "2026-06-25T22:02:12Z",
  "published" : "2026-06-25T22:02:12Z",
  "aliases" : [ "CVE-2026-55164" ],
  "summary" : "Lemur user-update path stores plaintext passwords",
  "details" : "## Summary\n\n`lemur.users.service.update()` writes a user's new password as plaintext to the `users.password` column. The `User` model wires bcrypt hashing to SQLAlchemy's `before_insert` event but registers no equivalent listener for `before_update`, and `service.update()` does not call `user.hash_password()` after assigning the new value. Every password change performed through the admin-gated `PUT /api/1/users/<id>` endpoint persists the user's password to the database in cleartext.\n\n## Root Cause\n\n`lemur/users/models.py`:\n\n```python\n# line 38\nclass User(BaseModel):\n    __tablename__ = \"users\"\n    id = Column(Integer, primary_key=True)\n    password = Column(String(128))            # plain column, no setter, no Vault descriptor\n\n# line 74\n    def hash_password(self):\n        if self.password:\n            self.password = bcrypt.generate_password_hash(self.password).decode(\"utf-8\")\n\n# line 111\nlisten(User, \"before_insert\", hash_password)  # only before_insert is wired\n```\n\n`lemur/users/service.py`:\n\n```python\n# line 46\ndef update(user_id, username, email, active, profile_picture, roles, password=None):\n    ...\n    user = get(user_id)\n    user.username = username\n    user.email = email\n    user.active = active\n    user.profile_picture = profile_picture\n    if password:\n        user.password = password              # raw assignment\n    update_roles(user, roles)\n    return database.update(user)              # commits, no hashing\n```\n\nNo `before_update` listener exists. `User.password` is a plain `Column(String(128))` with no property setter that hashes on assignment. The bcrypt code path is bypassed entirely on every UPDATE statement that touches this column.\n\n## Affected Endpoints\n\n| Method | Path | Source |\n|---|---|---|\n| PUT | /api/1/users/`<id>` | lemur/users/views.py:274 (gated by `@admin_permission.require`) |\n\n`lemur/auth/views.py:323` also calls `user_service.update()` during SSO/OAuth login, but passes only six positional arguments. `password` defaults to `None` on that path and the `if password:` guard short-circuits. The bug is triggered only through the admin-only PUT handler.\n\n## Impact\n\nWhen an administrator changes a user's password via `PUT /api/1/users/<id>`, the cleartext password is persisted to `users.password`. Subsequent login attempts for that user will fail (`check_password` calls `bcrypt.check_password_hash` against an unhashed value), pushing operators toward workarounds.\n\nThe more serious consequence is a defense-in-depth bypass. Bcrypt is the protection that prevents a database compromise from yielding usable credentials. With plaintext rows present, an attacker who exfiltrates the `users` table, a backup, a read replica, or query logs obtains directly usable login credentials — no offline cracking required. Because users reuse passwords across services, the blast radius extends beyond Lemur.\n\nThe bug specifically affects admin-driven password resets, which are the normal post-incident workflow and exactly when plaintext storage is most harmful.\n\n## Steps to Reproduce\n\n1. Install Lemur with default config. Create an admin user and a target user 'alice' (created via the standard flow, password will be hashed correctly on insert).\n\n2. Verify the initial hash:\n   psql lemur -c \"SELECT password FROM users WHERE username='alice';\"\n   # Output: $2b$12$N9Q...   (bcrypt hash, as expected)\n\n3. As admin, change alice's password via the API:\n   curl -X PUT https://lemur.local/api/1/users/<alice_id> \\\n        -H \"Authorization: Bearer <admin_jwt>\" \\\n        -H \"Content-Type: application/json\" \\\n        -d '{\n          \"username\": \"alice\",\n          \"email\": \"alice@example.com\",\n          \"active\": true,\n          \"profile_picture\": null,\n          \"roles\": [{\"name\": \"operator\"}],\n          \"password\": \"ProofOfConcept_2026\"\n        }'\n\n4. Read the column again:\n   psql lemur -c \"SELECT password FROM users WHERE username='alice';\"\n   # Output: ProofOfConcept_2026   ← plaintext, not hashed\n\n5. Confirm the failure mode: 'alice' can no longer log in with 'ProofOfConcept_2026'\n   because check_password runs bcrypt.check_password_hash() against the cleartext column.\n\n\n## Remediation\n\nRegister the listener for both events:\n\n```python\n# lemur/users/models.py\nlisten(User, \"before_insert\", hash_password)\nlisten(User, \"before_update\", hash_password)\n```\n\nAlternative, equivalent fix in the service layer:\n\n```python\n# lemur/users/service.py, in update()\n    if password:\n        user.password = password\n        user.hash_password()\n```\n\nThe listener fix is preferred because it closes the gap for any future code path that mutates `user.password`.\n\nA one-time migration is recommended to detect and re-hash any rows already stored in cleartext. Bcrypt hashes begin with `$2b$`, `$2a$`, or `$2y$`. Any cleartext credential should be treated as **compromised** — rotate it, do not just re-hash it — since it has been at rest in plaintext and may exist in backups, audit logs, and replicas.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lemur"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.9.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Netflix/lemur/security/advisories/GHSA-q437-g7fv-2jvv"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Netflix/lemur"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Netflix/lemur/releases/tag/v1.9.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-256" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-25T22:02:12Z",
    "nvd_published_at" : null
  }
}