Skip to content

GHSA-j593-h5v3-45x6 CVE-2022-4734 GO-2022-1220

usememos/memos may leak user information to an authenticated user

Medium Go
Severity
4.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.83%
Chance of exploitation in the next 30 days. Higher than 57.42% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-212 Improper Removal of Sensitive Information Before Storage or Transfer
Fix
0.9.1
Upgrade github.com/usememos/memos to this version or later

Description

usememos/memos 0.9.0 and prior has endpoint that leaks user information like names, email, role, and OpenID to an authenticated user. A patch is available at commit 05b41804e33a34102f1f75bb2d69195dda6a1210 on the main branch.

Affected versions

Go

PackageVulnerableFixed in
github.com/usememos/memos
< 0.9.1
0.9.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/usememos/memos Go → 0.9.1

go
go get github.com/usememos/memos@v0.9.1 && go mod tidy

Severity breakdown

CVSS 3.1 4.3

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Weakness

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer

The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.

How to prevent it
  • Requirements: Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation, Operation: Some tools can automatically analyze documents to redact, strip, or "sanitize" private information, although some human review might be necessary. Tools may vary in terms of which document formats can be processed. When calling an external program to automatically generate or convert documents, invoke the program with any available options that avoid generating sensitive metadata. Some formats have well-defined fields that could contain private data, such as Exchangeable image file format (Exif), which can contain potentially sensitive metadata such as geolocation, date, and time [REF-1515] [REF-1516].
  • Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
  • Implementation: Avoid errors related to improper resource shutdown or release (CWE-404), which may leave the sensitive data within the resource if it is in an incomplete state.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-gqp3-hfc3-8q54
Memos has an Incorrect Privilege Assignment issue
Medium Also affects github.com/usememos/memos
GHSA-qgjp-5g5x-vhq2
memos lacks file name validation or verification
Medium Also affects github.com/usememos/memos
GHSA-99m2-qwx6-2w6f
memos vulnerability allows arbitrarily modification or deletion registered identity providers
Medium Also affects github.com/usememos/memos
GHSA-mg56-wc4q-rw4w
memos vulnerability allows the creation of arbitrary accounts
High Also affects github.com/usememos/memos
GHSA-8p44-g572-557h
memos vulnerability allows arbitrarily modification or deletion of attachments
Medium Also affects github.com/usememos/memos
GHSA-8jcj-g9f4-qx42
memos vulnerability allows arbitrarily reactions deletion
Medium Also affects github.com/usememos/memos
GHSA-mr34-8733-grr2
Memos' Access Tokens Stay Valid after User Password Change
High Also affects github.com/usememos/memos
GHSA-cgrg-86m5-xm4w
Memos Vulnerable to Stored Cross-Site Scripting
Medium Also affects github.com/usememos/memos
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor