# CVE-2016-10533: Private Data Disclosure in express-restify-mongoose

> Attackers can retrieve private database fields, such as passwords, by exploiting a flaw in the express-restify-mongoose library's distinct query handling.

- **Severity:** High 8.8 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 May 2018
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-cgjx-mwpx-47jv

## What is CVE-2016-10533?

CVE-2016-10533 is a high-severity vulnerability in HackerOne express-restify-mongoose node module, published on 31 May 2018. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

express-restify-mongoose is a module to easily create a flexible REST interface for mongoose models. express-restify-mongoose 2.4.2 and earlier and 3.0.X through 3.0.1 allows a malicious user to send a request for `GET /User?distinct=password` and get all the passwords for all the users in the database, despite the field being set to private. This can be used for other private data if the malicious user knew what was set as private for specific routes.

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

## Which versions are affected by CVE-2016-10533?

4 open source packages ship an affected version, including express-restify-mongoose. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `express-restify-mongoose` | npm | All versions | 2.5.0 |
| `express-restify-mongoose` | npm | All versions | 2.5.0 |
| `express-restify-mongoose` | npm | From 3.0.0 | 3.1.0 |
| `express-restify-mongoose` | npm | From 3.0.0 | 3.1.0 |

Products: Express-Restify-Mongoose Project Express-Restify-Mongoose.

## How do I fix CVE-2016-10533?

Upgrade express-restify-mongoose to a fixed version for your release line: 2.5.0 or 3.1.0.

## Is CVE-2016-10533 being exploited?

There is no known exploitation of CVE-2016-10533 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-10533 and fix it if it is affected.

What it is: CVE-2016-10533 is a high-severity vulnerability in HackerOne express-restify-mongoose node module, published on 31 May 2018. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2016-10533 in the wild and no public exploit code.

Affected packages and fixed versions:
- express-restify-mongoose (npm): affected all versions; fixed in 2.5.0
- express-restify-mongoose (npm): affected all versions; fixed in 2.5.0
- express-restify-mongoose (npm): affected from 3.0.0; fixed in 3.1.0
- express-restify-mongoose (npm): affected from 3.0.0; fixed in 3.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2016-10533/ (Markdown: https://insights.sbomify.com/CVE-2016-10533/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2016-10533
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2016-10533
- OSV: https://osv.dev/vulnerability/CVE-2016-10533

---
From sbomify Insights: https://insights.sbomify.com/CVE-2016-10533/
Summaries are generated and may contain mistakes; the official description above is the record.
