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

Bug bounty for solving security issue - thank you @atomfrede #10402

Closed
jdubois opened this issue Sep 13, 2019 · 9 comments
Closed

Bug bounty for solving security issue - thank you @atomfrede #10402

jdubois opened this issue Sep 13, 2019 · 9 comments
Assignees
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $300 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@jdubois
Copy link
Member

jdubois commented Sep 13, 2019

This is linked to #10401

As discussed in the security advisory (not public yet), we put a $300 bug bounty for who was solving the issue (so $500 for reporting the issue, and $300 for solving it!).

@atomfrede you seem to have done the fix, so I'm assigning this to you, and adding the bounty here so we follow our usual process.

@jdubois jdubois added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $300 https://www.jhipster.tech/bug-bounties/ labels Sep 13, 2019
@atomfrede atomfrede changed the title Bug bounty for solving security issue - thank you @atomefrede Bug bounty for solving security issue - thank you @atomfrede Sep 13, 2019
@jdubois jdubois added this to the 6.3.0 milestone Sep 13, 2019
@atomfrede
Copy link
Member

Bounty claimed https://opencollective.com/generator-jhipster/expenses/10062 Thanks @jdubois for putting the bounty! It was great to work with everyone keeping calm on that issue!

@jdubois
Copy link
Member Author

jdubois commented Sep 13, 2019

Yes that was awesome to work together on this!

@pascalgrimaud
Copy link
Member

@atomfrede : can we close this ticket ?

@atomfrede
Copy link
Member

Yes

@tibistibi
Copy link
Contributor

Thanks for solving this problem!

in the upgrade it states:

How to fix the issue you probably don’t need to upgrade JHipster, as this just affects a few generated files, so this can be done manually. The issue is in the generated RandomUtil class. Here is this class in our sample application generated with JHipster v6.2.0 and here is the updated version, using JHipster v6.3.0. So all you need to do is copy the new file, which uses SecureRandom, and replace the older file.

Which is not totally true because these methods has been removed:

/**
 * Generate a unique series to validate a persistent token, used in the
 * authentication remember-me mechanism.
 *
 * @return the generated series data.
 */
public static String generateSeriesData() {
    return RandomStringUtils.randomAlphanumeric(DEF_COUNT);
}
/**
 * Generate a persistent token, used in the authentication remember-me mechanism.
 *
 * @return the generated token data.
 */
public static String generateTokenData() {
    return RandomStringUtils.randomAlphanumeric(DEF_COUNT);
}

should they be added with:

    return generateRandomAlphanumericString();

@jdubois
Copy link
Member Author

jdubois commented Sep 19, 2019

@tibistibi the methods signatures of RandomUtil should be the same, what is inside those methods did change

@tibistibi
Copy link
Contributor

yes clear! maybe good to add the information to the upgrade page?

@tibistibi
Copy link
Contributor

tibistibi commented Sep 19, 2019

so for me i could fix it by replacing the RandomUtil file and add this:


/**
 * Generate a unique series to validate a persistent token, used in the
 * authentication remember-me mechanism.
 *
 * @return the generated series data.
 */
public static String generateSeriesData() {
    return generateRandomAlphanumericString();
}
/**
 * Generate a persistent token, used in the authentication remember-me mechanism.
 *
 * @return the generated token data.
 */
public static String generateTokenData() {
    return generateRandomAlphanumericString();
}

@ruddell
Copy link
Member

ruddell commented Sep 19, 2019

@tibistibi RandomUtil depends on your auth type, Session auth has some extra methods. I couldn't find sample apps for Session or UAA, so you can see the various options here: https://github.com/ruddell/jhipster-examples/tree/cve-random-util-fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $300 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

No branches or pull requests

5 participants