logo

CVE-2016-10533 express-restify-mongoose

Package

Manager: npm
Name: express-restify-mongoose
Vulnerable Version: >=3.0.0 <3.1.0 || >=0 <2.5.0

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:U/RL:U/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00255 pctl0.48763

Details

Private Data Disclosure in express-restify-mongoose Affected versions of `express-restify-mongoose` are susceptible to an information leakage vulnerability which may allow an attacker to access fields on a model even if those fields are marked as private. ## Proof of Concept If you have a user model that you want to protect, such as the following User model: ``` const User = mongoose.model('User', new mongoose.Schema({ name: String, password: String, })); ``` You would normally do something such as: ``` restify.serve(router, User, { private: ['password'], // Set the password part of User as private, so outside people can't read it }) ``` This would hide the password field from people that send your application a `GET /User` and `GET /User/some-user-id` request. A malicious user can go to your application and 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 could be used for other private data, if the malicious user knew what was set as private for specific routes. ## Recommendation Version 2.x: Update to version 2.5.0 or later. Version 3.x: Update to version 3.1.0 or later.

Metadata

Created: 2018-10-23T17:14:57Z
Modified: 2020-08-31T18:10:32Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/10/GHSA-cgjx-mwpx-47jv/GHSA-cgjx-mwpx-47jv.json
CWE IDs: ["CWE-200"]
Alternative ID: GHSA-cgjx-mwpx-47jv
Finding: F038
Auto approve: 1