Closed Bug 1304576 Opened 10 years ago Closed 10 years ago

Useable credentials situated on - https://tools.taskcluster.net/secrets/

Categories

(Websites :: Other, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: griffin.francis.1993, Unassigned)

References

Details

(Keywords: reporter-external, sec-critical, wsec-disclosure)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 Steps to reproduce: Hello. Whilst looking around taskcluster I have found some credentials which appear to work for one of your S3 Buckets releng-cache, I have uploaded test.txt to this bucket as a proof of concept. There also appears to be some Heroku & Bugzilla credentials which are present here. These details were situated at the following link: https://tools.taskcluster.net/secrets/ The details which I found are as follows: Secret Name garbage/shipit/bugzilla Expiresin a year Secret Value (JSON Object) { "login": "bastien@nextcairn.com", "token": "g0FtuvwrDriDLTC4y454Fht0In9CcC99PS13qPxK" } Secret Name garbage/garbas/temp-releng-services-staging Expiresin a year Secret Value (JSON Object) { "CACHE_BUCKET": "releng-cache", "AWS_ACCESS_KEY_ID": "AKIAIK5ANTSJ2XMXICBQ", "AWS_SECRET_ACCESS_KEY": "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", "HEROKU_USERNAME": "garbas", "HEROKU_PASSWORD": "584734eb-844d-4528-ad0f-2f158923c94a" } Secret Name garbage/garbas/temp-releng-services-production Expiresin a year Secret Value (JSON Object) { "CACHE_BUCKET": "releng-cache", "AWS_ACCESS_KEY_ID": "AKIAJR3CXE347I5LKEPA", "AWS_SECRET_ACCESS_KEY": "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", "HEROKU_USERNAME": "garbas", "HEROKU_PASSWORD": "584734eb-844d-4528-ad0f-2f158923c94a" } Secret Name garbage/garbas/temp-releng-services-master Expiresin a year Secret Value (JSON Object) { "CACHE_BUCKET": "releng-cache", "AWS_ACCESS_KEY_ID": "AKIAJ7VTX26QM7UHJQNA", "AWS_SECRET_ACCESS_KEY": "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", "HEROKU_USERNAME": "garbas", "HEROKU_PASSWORD": "584734eb-844d-4528-ad0f-2f158923c94a" } Actual results: I was able to view these sensitive credentials within Taskcluster which do not pertain to myself. Expected results: These credentials should not able to be accessed.
caught up with Griffin on IRC, he was able to write to the S3 bucket (http://releng-cache.s3.amazonaws.com/) and land test.txt.
catlee/rgarbas/sdeckelmann: FYI - we should probably mobilize on this first thing tomorrow and get the credentials rotated and do a quick audit to see if there are other credentials in the same state at risk of being leaked. On the surface, this seems less like a vulnerability and more just misuse, but I defer to TaskCluster experts for their take.
Flags: needinfo?(sdeckelmann)
Flags: needinfo?(rgarbas)
Flags: needinfo?(catlee)
Flags: needinfo?(garndt)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: sec-bounty?
set bastien@nextcairn.com bugzilla account to require password change.
Looping dustin into this discussion since he's worked on tc-secrets. Were these secrets obtained from the secrets UI while logged into the tools site? Might be that your client ID has scopes to access those secrets.
Ah, nevermind, I see that these are garbage/ secrets which I think a lot of people have scopes for.
Flags: needinfo?(garndt)
Yep, I don't think we can get any more explicit that the "garbage/" hierarchy is for garbage and not actually secret.. Well, I suppose we could -- perhaps when editing a secret with that prefix we could display a warning that THIS IS NOT ACTUALLY SECRET, PLEASE DO NOT PUT REAL SECRETS HERE. The AWS keys are in the releng AWS account: AKIAIK5ANTSJ2XMXICBQ (user: releng-staging, with just S3 sync privileges) AKIAJR3CXE347I5LKEPA (user: releng-production, with just S3 sync privileges) AKIAJ7VTX26QM7UHJQNA (user: releng-develop, with just S3 sync privileges) I've disabled all three. Rok, it would be wise to audit and/or delete everything in the affected buckets.
i will change/rotate the above api keys. used keys were only temporary (nothing from mozilla-releng/services is actually running in production, yet). apart from that, i was under impression that a secret in garbage/* are at least secret but have very loose scopes. and +1 on big warning there. a better way would actually be to not allow to create stuff in garbage/* if it is not protected. i don't see a value in non-secret secrets :)
Flags: needinfo?(rgarbas)
It's a place to experiment with the secrets API, and yes, the scopes are very loose -- anyone with an email address has access. So I suppose it's semantics, but at any rate when handling real credentials you should probably not assume, especially that something named "garbage" is anything but garbage :)
i regenerated all api keys and moved secrets to repo:github.com/mozilla-releng/services:branch:<branch-name> i'm having some troubles with scopes but i'll ask for help on #taskcluster for this https://github.com/mozilla-releng/services/commit/c70e3321a3d31f95036588c14dfafc3a0ea581f3#commitcomment-19145118
Awesome -- so this particular disclosure is resolved.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(catlee)
Resolution: --- → FIXED
Thanks all for the quick turn around! Also, thanks to Griffin for finding and alerting us of this.
Flags: sec-bounty? → sec-bounty+
Keywords: sec-high → sec-critical
Group: websites-security
You need to log in before you can comment on or make changes to this bug.