Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Insufficient randomness in github.com/Masterminds/goutils

cve-program · severity unknownEUVD CVSS 3.1 9.1 CVSS 3.1 · [email protected] · Primary 9.1 CRITICALCVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary 9.1 CRITICALCVSS_V3 Publisher rating CRITICALFixed by github.com/Masterminds/goutils 1.1.1Publisher rating LOWFixed by github.com/Masterminds/goutils 1.1.1osv · severity unknownFixed by github.com/Masterminds/goutils 1.1.1KEV status unknown

cve-program · CVE-2021-4238

Published

Randomly-generated alphanumeric strings contain significantly less entropy than expected. The RandomAlphaNumeric and CryptoRandomAlphaNumeric functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

Read the publisher's advisory

euvd · EUVD-2022-7482

Published

Randomly-generated alphanumeric strings contain significantly less entropy than expected. The RandomAlphaNumeric and CryptoRandomAlphaNumeric functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

Read the publisher's advisory

nvd · CVE-2021-4238

Published

Randomly-generated alphanumeric strings contain significantly less entropy than expected. The RandomAlphaNumeric and CryptoRandomAlphaNumeric functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

Read the publisher's advisory

osv · GHSA-3839-6r69-m497

Withdrawn

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-xg2h-wx96-xgxr. This link is maintained to preserve external references. ## Original Description Randomly-generated alphanumeric strings contain significantly less entropy than expected. The `RandomAlphaNumeric` and `CryptoRandomAlphaNumeric` functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

Read the publisher's advisory

osv · GHSA-xg2h-wx96-xgxr

Published

### Impact A security-sensitive bug was discovered by Open Source Developer *Erik Sundell of Sundell Open Source Consulting AB*. The functions `RandomAlphaNumeric(int)` and `CryptoRandomAlphaNumeric(int)` are not as random as they should be. Small values of `int` in the functions above will return a smaller subset of results than they should. For example, `RandomAlphaNumeric(1)` will always return a digit in the 0-9 range, while `RandomAlphaNumeric(4)` will return around ~7 million of the ~13M possible permutations. This is considered a security release because programs that rely upon random generators for passwords are at an increased risk of brute force-style password guessing. There is also a higher probability of collision. The problem was the result of a mistaken regular expression that only accepted random strings if they contained a digit from `[0-9]`. That restriction has been removed. ### Patches This issue has been corrected in v1.1.1. ### Workarounds If you cannot upgrade to v1.1.1, you can work around the issue by calling `RandomAlphaNumericCustom(N, true, true)`|`CryptoRandomAlphaNumericCustom(N, true, true)` instead. (Where `N` is the desired length, and `true` is the literal boolean `true`.)

Read the publisher's advisory

osv · GO-2022-0411

Published

Randomly-generated alphanumeric strings contain significantly less entropy than expected. The RandomAlphaNumeric and CryptoRandomAlphaNumeric functions always return strings containing at least one digit from 0 to 9. This significantly reduces the amount of entropy in short strings generated by these functions.

Read the publisher's advisory

Affected versions, risk and source history

Related advisories and sources

Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.

CVE-2021-4238 · CVE overview and exploitation status

EUVD-2022-7482

GHSA-3839-6r69-m497

GHSA-xg2h-wx96-xgxr

GO-2022-0411

cve-program · CVE-2021-4238

euvd · EUVD-2022-7482

nvd · CVE-2021-4238

osv · GHSA-3839-6r69-m497

osv · GHSA-xg2h-wx96-xgxr

osv · GO-2022-0411

Related changes

Linked by CVE identifier

No related changes are available here.

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 19 Nov 04:49 UTC · 273 of 275 readable · 269 fully read · documentation 469/469 current