From 9e132d5bc8964ab33e9d4c06a14aea910012248d Mon Sep 17 00:00:00 2001 From: Jared Perreault Date: Thu, 6 Jun 2024 10:18:19 -0400 Subject: [PATCH] CVE-2024-34273 --- CHANGELOG.md | 4 ++++ index.js | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c4d201..2efe756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # nJwt Change Log +### 2.0.1 + +* [#107](https://github.com/jwtk/njwt/pull/107) Freeze `prototype` of all classes to prevent prototype pollution vuln ([CVE-2024-34273](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2024-34273)) + ### 2.0.0 * [#98](https://github.com/jwtk/njwt/pull/98) Bumps jsonwebtoken version, drop Node < 12 from engines diff --git a/index.js b/index.js index 14a38fb..fe5c61a 100644 --- a/index.js +++ b/index.js @@ -263,9 +263,6 @@ Jwt.prototype.compact = function compact() { }; Jwt.prototype.toString = function(){ - if (this.__originalString) { - return this.__originalString; - } return this.compact(); };