CVE-2024-21635: Github.com/usememos/memos Memos' Access Tokens Stay Valid Vulnerability

HIGH
Advisory Identifier: GHSA-mr34-8733-grr2
CWE-287
Published
Advisory Summary

CVE-2024-21635 is a HIGH memos' access tokens stay valid vulnerability (CWE-287: Improper Authentication) affecting Github.com/usememos/memos libraries in the Go ecosystem. The issue involves memos' access tokens stay valid after user password change. Remediation is available by upgrading affected packages to version 0.18.2.

CVE-2024-21635 at a Glance

CVE Identifier CVE-2024-21635
GHSA Identifier GHSA-mr34-8733-grr2
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/usememos/memos
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2024-21635

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

github.com/usememos/memos fixed: 0.18.2
Upgrade github.com/usememos/memos to 0.18.2
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/usememos/memos

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-21635, inspect your project dependencies for Github.com/usememos/memos:

inspect dependencies for github.com/usememos/memos

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/usememos/memos, 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 Access Tokens are used to authenticate application access. When a user changes their password, the existing list of Access Tokens stay valid instead of expiring. If a user finds that their account has been compromised, they can update their password. The bad actor though will still have access to their account because the bad actor's Access Token stays on the list as a valid token. The user will have to manually delete the bad actor's Access Token to secure their account. The list of Access Tokens has a generic Description which makes it hard to pinpoint a bad actor in a list of Access Tokens. ### Details To improve Memos security, all Access Tokens will need to be revoked when a user changes their password. This removes the session for all the user's devices and prompts the user to log in again. You can treat the old Access Tokens as "invalid" because those Access Tokens were created with the older password. ### PoC 1. Have 2 devices on hand 2. Log onto your Memos account on both devices. Notice how Access Tokens are created for each. 3. On one device, successfully change the password. Refresh the page on the 2nd device and notice how it doesn't log out the user. 4. On the 2nd device, change the password again. Refresh the page on the 1st device and notice how it doesn't log out the user. ### Impact A bad actor will still have access to the user's account because the Access Token does not expire on a password update. Having multi-factor authentication will vastly improve account security in Account Takeover cases instead of just relying on a password.

CVE-2024-21635 Affected Github.com/usememos/memos Versions

1 component(s)
Fixed Versions:
0.18.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/usememos/memos
Go
< 0.18.2
0.18.2

References

Frequently Asked Questions

What is CVE-2024-21635?
CVE-2024-21635 is a security vulnerability in Github.com/usememos/memos involving Memos' Access Tokens Stay Valid after User Password Change under CWE-287: Improper Authentication.
Which Github.com/usememos/memos versions are affected?
Affected versions include releases prior to 0.18.2 across affected packages: github.com/usememos/memos.
What version fixes CVE-2024-21635?
Upgrading to 0.18.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/usememos/memos affected?
Yes, github.com/usememos/memos is affected in releases prior to 0.18.2. Upgrade your dependency to 0.18.2 or later.
What CWE is associated with CVE-2024-21635?
CVE-2024-21635 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2024-21635?
Run the dependency tree command: 'inspect dependencies for github.com/usememos/memos'. 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-mr34-8733-grr2",
  "modified" : "2026-03-12T11:00:01Z",
  "published" : "2025-11-14T22:09:54Z",
  "aliases" : [ "CVE-2024-21635" ],
  "summary" : "Memos' Access Tokens Stay Valid after User Password Change",
  "details" : "### Summary\nAccess Tokens are used to authenticate application access. When a user changes their password, the existing list of Access Tokens stay valid instead of expiring. If a user finds that their account has been compromised, they can update their password. \n\nThe bad actor though will still have access to their account because the bad actor's Access Token stays on the list as a valid token. The user will have to manually delete the bad actor's Access Token to secure their account. The list of Access Tokens has a generic Description which makes it hard to pinpoint a bad actor in a list of Access Tokens. \n\n### Details\n\nTo improve Memos security, all Access Tokens will need to be revoked when a user changes their password. This removes the session for all the user's devices and prompts the user to log in again. You can treat the old Access Tokens as \"invalid\" because those Access Tokens were created with the older password.\n\n### PoC\n\n1. Have 2 devices on hand\n2. Log onto your Memos account on both devices. Notice how Access Tokens are created for each.\n3. On one device, successfully change the password. Refresh the page on the 2nd device and notice how it doesn't log out the user.\n4. On the 2nd device, change the password again. Refresh the page on the 1st device and notice how it doesn't log out the user.\n\n### Impact\n\nA bad actor will still have access to the user's account because the Access Token does not expire on a password update. Having multi-factor authentication will vastly improve account security in Account Takeover cases instead of just relying on a password.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/usememos/memos"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.18.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.18.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/usememos/memos/security/advisories/GHSA-mr34-8733-grr2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21635"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/usememos/memos"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/usememos/memos/releases/tag/v0.18.2"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/Top10/A04_2021-Insecure_Design"
  }, {
    "type" : "WEB",
    "url" : "http://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-14T22:09:54Z",
    "nvd_published_at" : "2025-11-14T15:15:48Z"
  }
}