Closed Bug 1704387 Opened 5 years ago Closed 5 years ago

github_secret available on bugzilla.mozilla.org/index.cgi when not logged in

Categories

(bugzilla.mozilla.org :: General, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: hasskooelhadi, Unassigned)

References

()

Details

(Keywords: reporter-external, Whiteboard: [reporter-external] [client-bounty-form] [verif?])

Attachments

(1 file)

Attached image ss.png

I've found a github secret on the source code , in different web pages .
step to reproduce :
1- go to : https://bugzilla.mozilla.org/index.cgi.
2- review the source code .
3- press ctrl+F and search for secret .
4- there u go :) .
i found it using only browser (firefox87.0 (64-bit) latest version when i report this ) and it will work on all browser because it is included the source code .

Flags: sec-bounty?

It's unclear to me what the point of this token is and if it is as "secret" as the name implies. :glob, perhaps you know?

Group: firefox-core-security → bugzilla-security
Type: task → defect
Component: Security → General
Flags: needinfo?(glob)
Product: Firefox → bugzilla.mozilla.org
Summary: sensetive information disclosure at bugzilla.mozilla.org → github_secret available on bugzilla.mozilla.org/index.cgi when not logged in

This isn't a Bugzilla's GitHub secret, it's a randomly generated string to protect against some redirection attacks:

https://github.com/mozilla-bteam/bmo/blob/c79876b54589b4d90cc0e9781d8b40fbec38b25b/Bugzilla/CGI.pm#L390-L400

  # We generate a cookie and store it in the request cache
  # To initiate GitHub login, a form POSTs to github.cgi with the
  # github_secret as a parameter. It must match the github_secret cookie.
  # this prevents some types of redirection attacks.
  unless ($user->id || $self->{bz_redirecting}) {
    $self->send_cookie(
      -name     => 'github_secret',
      -value    => Bugzilla->github_secret,
      -httponly => 1
    );
  }

https://github.com/mozilla-bteam/bmo/blob/c79876b54589b4d90cc0e9781d8b40fbec38b25b/Bugzilla.pm#L209-L218

sub github_secret {
  my ($class) = @_;
  my $cache   = request_cache;
  my $cgi     = $class->cgi;

  $cache->{github_secret} //= $cgi->cookie('github_secret')
    // generate_random_password(256);

  return $cache->{github_secret};
}
Group: bugzilla-security
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(glob)
Resolution: --- → INVALID
Flags: sec-bounty? → sec-bounty-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: