Closed Bug 1699750 Opened 5 years ago Closed 2 years ago

Mozilla Slack - Mr-Pushbot Insufficient ACL Permissions

Categories

(Websites :: Hubs, task)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: griffin.francis.1993, Assigned: bpeiris)

Details

(Keywords: reporter-external, sec-high, wsec-authorization, Whiteboard: [reporter-external] [web-bounty-form] [verif?])

Hi. It was observed that the MR bot on the Mozilla slack would enable an attacker to potentially mess with production code.

Commands which can be issued:

"Invalid command, try hab promote <package>, ret deploy <version> <pool>, hubs deploy <version> <s3 target>, spoke deploy <version> <s3 target>"

I was able to run these commands as a Mozilla contributor.

Flags: sec-bounty?
Flags: needinfo?(jclaudius)
Flags: needinfo?(jclaudius)
Assignee: nobody → bpeiris
Status: UNCONFIRMED → NEW
Ever confirmed: true

Summarized action expections per slack:

  • #mr-builds and #mr-push would get locked down from public to private
  • only allow the bot to respond in those channels
  • punt unnecessary participants from those locked rooms (eg. griffin/claudijd/<anyone else that doesn't have a business need>)

The bot is now restricted to certain channels and I have also restricted posting permissions in those channels. I have put in a request to convert the channels to private, at which point I will remove unnecessary participants.

All action items are now complete. I think we can call this closed.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

The panel met on this today, we're still sussing out what the impact could have been with this access, so we deferred making a bounty decision until we can get more clarity on that.

Brian and I discussed this more to undertstand the S3 inputs here and understanding potential impacts. The S3 input and output URLs are effectively the same, so we're not concerned about an evil S3 URL from resulting in a direct prod compromise. However, we did uncover a concern around what if the S3 is an evil S3 URL, it could be possible for an attacker to trick the build into leaking it's S3 r/w credential for prod. I'm reopening this temporarily, to consider an additional control around white-listing the S3 destinations. That said, the authorized user group is much smaller now (<10 people down from ~1000 in slack).

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: sec-bounty? → sec-bounty+

Hello Brian,

I saw that this bug was reopened because we needed to implement further measures to protect the service, I am wondering if those measures were implemented and we can close this bug.

Thanks,
Frida

Flags: needinfo?(bpeiris)

I'm afraid this has remained at the bottom of my todo list, since it's an internal system and has been mitigated to an extent. I still want to get to it eventually.

Flags: needinfo?(bpeiris)

This bug is also tracked in our Jira project: https://mozilla-hub.atlassian.net/browse/HUBSTRKY-309

The remaining concern with this issue might resolve itself relatively soon, since we are moving away from Slack-based deploy commands, to GitHub Actions in our new infrastructure.

Component: Other → Hubs

The MR slack app has been removed

Status: REOPENED → RESOLVED
Closed: 5 years ago → 2 years ago
Resolution: --- → FIXED
Group: websites-security
You need to log in before you can comment on or make changes to this bug.