typestack/class-transformer · Security
Prototype pollution in class-transformer
- GHSA ID
- GHSA-6gp3-h3jj-prx4
- CVE ID
- CVE-2020-7637
- Severity
- medium
- Published
- Updated
- CVSS
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- CVSS v3
- 5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Description
class-transformer through 0.2.3 is vulnerable to Prototype Pollution. The 'classToPlainFromExist' function could be tricked into adding or modifying properties of 'Object.prototype' using a 'proto' payload.
CWEs
- CWE-915 · Improperly Controlled Modification of Dynamically-Determined Object Attributes
- CWE-1321 · Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-7637 ↗
- https://github.com/typestack/class-transformer/blob/a650d9f490573443f62508bc063b857bcd5e2525/src/ClassTransformer.ts#L29-L31, ↗
- https://snyk.io/vuln/SNYK-JS-CLASSTRANSFORMER-564431 ↗
- https://github.com/typestack/class-transformer/commit/8f04eb9db02de708f1a20f6f2d2bb309b2fed01e ↗
- https://github.com/advisories/GHSA-6gp3-h3jj-prx4 ↗