Compsci student walks off with $50,000 after bug bounty report blows gaping hole in Shopify software repos

First-timer wins maximum payout through HackerOne programme


Shopify has forked out $50,000 (£36,150) in a bug bounty payment to computer science student Augusto Zanellato following the discovery of a publicly available access token which gave world+dog read-and-write access to the company's source code repositories.

Zanellato uncovered the vulnerability while investigating a third-party Electron-based macOS application created by a Shopify developer. "I can't share the name," Zanellato told The Register, "but I can say it's a desktop client for a popular video conferencing platform which doesn't provide an official one."

The issue: the inclusion of an environment file in the compiled application, which when extracted revealed the developer's access token for their GitHub account – an account which had access not only to the application's own repository but to Shopify's repositories too.

"After finding the GitHub token inside the application I tried to use it against the GitHub API to see what token it was, whom it belongs to, what privileges it had etc.," Zanellato told us. "I found out that the user in question was a member of the Shopify organisation and that he had push and pull access to all the private Shopify repositories."

The token gave Zanellato, and by extension anyone else who investigated the inner workings of the publicly-available app, complete access to Shopify's GitHub repositories. With it, Zanellato was able to confirm the ability to push modified source code – which if not spotted in time would be included in Shopify's software builds, offering a route to introduce a backdoor into sites using the software.

Thankfully, the Canadian e-commerce giant took the issue as seriously as it should. Following private disclosure, now released publicly, via the HackerOne bug bounty platform, the company revoked the access token within 24 hours and granted the vulnerability a CVSS severity score of 10 – the highest possible.

"We addressed this issue immediately after receiving this report by revoking the GitHub Personal Access Token," Jack McCracken, senior application security engineer at Shopify, wrote in a follow-up to the report. "However, we wanted to wait to resolve this issue until we felt we had implemented a long-term mitigation that reduced the likelihood that it would reoccur."

In its own summary, Shopify notes that an audit of access logs confirmed "no unauthorised activity" relating to the access token had occurred. The company has not, however, detailed exactly what steps it has taken to prevent similar security issues in the future.

"It wasn't really Shopify's fault here," Zanellato told us, "because for what I know GitHub doesn't (at least yet) support generating an access token that grants access to personal repositories but not to organisation-owned ones. There's something similar to that because GitHub applications can be granted access only to user repositories without granting organisation access, but no similar things for tokens."

A two-factor authentication dongle wouldn't have helped either, Zanellato explained: "I strongly support using physical tokens for 2FA but in this case it would have been worthless because access tokens are meant to be used by computers and not by humans. As such they ignore if 2FA is enabled or not in the owner account."

A severe vulnerability deserves a hefty payout, and Shopify surprised Zanellato with its generosity on that front: the company paid out an impressive $50,000 (£36,150) for his responsible disclosure, made six months ago – the maximum it offers in its bug bounty programme, which averages $500-750 (£362-542) per bounty. Since launch, the company has paid out $1.6m (£1.16m) through the programme across 1,221 resolved reports.

The bumper bounty was Zanellato's first. "It might surprise you, but in fact I never started hunting for bugs," he said. "I have a technical background as a programmer (mainly game developing and backend, but I also have some frontend experience) with a focus on writing secure stuff instead of things that just work but with security holes as big as the Kimberley Mine."

Shopify was founded in 2006 by Tobias Lütke and Scott Lake following the pair's failure to find a suitable off-the-shelf e-commerce platform for a planned snowboarding store, Snowdevil. Today the Shopify platform is used by more than 1.7 million merchants globally – all of whom could have been impacted by the leaked token, had it been abused.

It may not be the only company affected, however. "I haven't found a lot of reports investigating Electron applications so I'm not sure about how common this specific vulnerability is," Zanellato told us, "but I think it could be an attack surface that's not well explored.

"I don't think companies can do much to protect themselves against this kind of vulnerability except forcing employees to have a work account separated from the personal account, but that would be a hassle in my opinion. The best solution would be that GitHub adds some way of limiting access tokens scope to a subset of a user's repositories or organisations."

Shopify did not respond to a request for additional comment, in particular on why developers were allowed to use the same GitHub accounts for personal projects as unlocks the company's repositories and the steps it has taken to prevent future issues of the same kind, in time for publication.

Neither did GitHub, acquired by Microsoft in 2018 for $7.5bn, respond to queries regarding Zanellato's comments for how it could potentially address the issue in the future. ®

Similar topics


Other stories you might like

  • Running Windows 10? Microsoft is preparing to fire up the update engines

    Winter Windows Is Coming

    It's coming. Microsoft is preparing to start shoveling the latest version of Windows 10 down the throats of refuseniks still clinging to older incarnations.

    The Windows Update team gave the heads-up through its Twitter orifice last week. Windows 10 2004 was already on its last gasp, have had support terminated in December. 20H2, on the other hand, should be good to go until May this year.

    Continue reading
  • Throw away your Ethernet cables* because MediaTek says Wi-Fi 7 will replace them

    *Don't do this

    MediaTek claims to have given the world's first live demo of Wi-Fi 7, and said that the upcoming wireless technology will be able to challenge wired Ethernet for high-bandwidth applications, once available.

    The fabless Taiwanese chip firm said it is currently showcasing two Wi-Fi 7 demos to key customers and industry collaborators, in order to demonstrate the technology's super-fast speeds and low latency transmission.

    Based on the IEEE 802.11be standard, the draft version of which was published last year, Wi-Fi 7 is expected to provide speeds several times faster than Wi-Fi 6 kit, offering connections of at least 30Gbps and possibly up to 40Gbps.

    Continue reading
  • Windows box won't boot? SystemRescue 9 may help

    An ISO image you can burn or drop onto a USB key

    The latest version of an old friend of the jobbing support bod has delivered a new kernel to help with fixing Microsoft's finest.

    It used to be called the System Rescue CD, but who uses CDs any more? Enter SystemRescue, an ISO image that you can burn, or just drop onto your Ventoy USB key, and which may help you to fix a borked Windows box. Or a borked Linux box, come to that.

    SystemRescue 9 includes Linux kernel 5.15 and a minimal Xfce 4.16 desktop (which isn't loaded by default). There is a modest selection of GUI tools: Firefox, VNC and RDP clients and servers, and various connectivity tools – SSH, FTP, IRC. There's also some security-related stuff such as Yubikey setup, KeePass, token management, and so on. The main course is a bunch of the usual Linux tools for partitioning, formatting, copying, and imaging disks. You can check SMART status, mount LVM volumes, rsync files, and other handy stuff.

    Continue reading

Biting the hand that feeds IT © 1998–2022