Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insecure Random #3

Open
FanjunMeng opened this issue Oct 18, 2018 · 8 comments
Open

Insecure Random #3

FanjunMeng opened this issue Oct 18, 2018 · 8 comments

Comments

@FanjunMeng
Copy link

FanjunMeng commented Oct 18, 2018

return simplifiedChineseTexts[new Random().nextInt(simplifiedChineseTexts.length)];

I think it should be use a secure random algorithm “SecureRandom” to generate verifycode
An attacker will simply compute the seed from the output values observed. This takes significantly less time than 2^48 in the case of java.util.Random.
It is shown that you can predict future Random outputs observing only two(!) output values in time roughly 2^16.

@helloworldtang
Copy link

mark

@aichaoxy
Copy link
Contributor

aichaoxy commented Feb 6, 2019

Since Github has kept giving alert on the insufficient randomness in this project, I suggest that we replace all the usage of new Random() with new SecureRandom() to avoid the risk.

CVE-2018-18531

@aichaoxy
Copy link
Contributor

aichaoxy commented Feb 6, 2019

#4

@hurelhuyag
Copy link

Any release since this change?

@wxy8866
Copy link

wxy8866 commented May 7, 2022

Please merge this pull request and push a new release.

@uniquejava
Copy link

@penggle

@isaclutz
Copy link

Is it possible to publish a new version to mvnrepository? https://mvnrepository.com/artifact/com.github.penggle/kaptcha

The version here on githab has the fix for CVE-2018-18531 but the version number in the build files is still 2.3.2, which was published in 2015. Can we build and publish the current source with a patch version (2.3.3?)

@wxy8866
Copy link

wxy8866 commented Apr 27, 2023

It's out of maintenance. Is it possible to change the owner to maintain this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants