SNYK-DOTNET-PUBNUB-6098372
Record from snyk · Published December 5, 2023
pubnub is fixed in 6.19.0 (NuGet)
## Overview Affected versions of this package are vulnerable to Insufficient Entropy via the `getKey` function, due to inefficient implementation of the `AES-256-CBC` cryptographic algorithm. The provided encrypt function is less secure when hex encoding and trimming are applied, leaving half of the bits in the key always the same for every encoded message or file. **Note:** In order to exploit this vulnerability, the attacker needs to invest resources in preparing the attack and brute-force the encryption. ## Remediation Upgrade `Pubnub` to version 6.19.0 or higher. ## References - [GitHub Commit](https://github.com/pubnub/javascript/commit/fb6cd0417cbb4ba87ea2d5d86a9c94774447e119) - [GitHub Gist](https://gist.github.com/vargad/20237094fce7a0a28f0723d7ce395bb0) - [Vulnerable Code](https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70)
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| pubnub | NuGet | 6.19.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| 0 |
Timeline
- Aug 13, 2023 CVE Updated
- Dec 5, 2023 CVE Published
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln SNYK-DOTNET-PUBNUB-6098372
vulnetix vdb fixes SNYK-DOTNET-PUBNUB-6098372
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/SNYK-DOTNET-PUBNUB-6098372/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://learn.snyk.io/lesson/insecure-randomness/ technical
- https://security.snyk.io/vuln/SNYK-DOTNET-PUBNUB-6098372 advisory
- https://learn.snyk.io/lesson/insecure-randomness/?source=security-snyk-io&ecosystem=csharp technical
- https://github.com/pubnub/javascript/commit/fb6cd0417cbb4ba87ea2d5d86a9c94774447e119 patch
- https://gist.github.com/vargad/20237094fce7a0a28f0723d7ce395bb0 technical
- https://github.com/pubnub/javascript/blob/master/src/crypto/modules/web.js#L70 technical