Vulnerability / Unexpected Token Verification Behavior with Private Key
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
調査の方向性
まず、issue に記載されている RS256 の手順を使い、Node.js の crypto モジュールと JWT の sign および verify エントリポイントで報告された動作を再現します。バージョン 8.5.1 と 9.0.1 における、文書化された鍵の扱いに関する想定を確認します。動作が説明され、期待される結果または必要な変更が明確に確立されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue Title: Unexpected Token Verification Behavior with Private Key
Description:
I've encountered unexpected behavior while using the jsonwebtoken library for token verification. As per best practices, I'm aware that token verification should use the public key, but I noticed that token verification is succeeding even when using the private key.
Steps to Reproduce:
Generate an RSA key pair using the crypto module.
Sign a JWT using the private key with the RS256 algorithm.
Attempt to verify the JWT using the private key instead of the public key.
Expected Behavior:
Token verification using the private key should fail, as the private key is meant for signing, not verification.
Actual Behavior:
Token verification using the private key surprisingly succeeds, which contradicts the expected behavior.
Environment:
Node.js version: v16.19.0
jsonwebtoken library version: 9.0.1/8.5.1 -> In these versions I have checked.
Operating System: Windows 10
Additional Information:
I've verified this behavior in multiple environments to ensure accuracy. It's important to clarify that this behavior goes against established best practices for token verification. I would appreciate assistance in understanding if this is an issue or if there's a valid explanation for this behavior.
- 主要言語
- JavaScript
- スター
- 18.2k
- フォーク
- 1.3k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/node-jsonwebtoken のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
auth0/node-jsonwebtoken#1042 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
auth0/node-jsonwebtoken#1000 · コメント 2 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
auth0/node-jsonwebtoken#1046 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
auth0/node-jsonwebtoken#1034 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
auth0/node-jsonwebtoken#1032 ·
auth0/node-jsonwebtoken の issue をすべて見る
似ている issue
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
open-webui/open-webui#30750 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100