URL parsing in node-forge could lead to undesired behavior.
Published 8 Jan 2022 · Updated 7 Jan 2022
Affected package
- Affected
- <1.0.0
- Fixed in
- 1.0.0
npm install node-forge@1.0.0Details
Impact
The regex used for the forge.util.parseUrl API would not properly parse certain inputs resulting in a parsed data structure that could lead to undesired behavior.
Patches
forge.util.parseUrl and other very old related URL APIs were removed in 1.0.0 in favor of letting applications use the more modern WHATWG URL Standard API.
Workarounds
Ensure code does not directly or indirectly call forge.util.parseUrl with untrusted input.
References
- https://www.huntr.dev/bounties/41852c50-3c6d-4703-8c55-4db27164a4ae/
For more information
If you have any questions or comments about this advisory:
- Open an issue in forge
- Email us at support@digitalbazaar.com
Is GHSA-gf8q-jrpm-jvxq in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected node-forge, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.