-
Notifications
You must be signed in to change notification settings - Fork 975
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
[CVE-2018-12556] Bypassing signature verification in Yarn package manager #937
Comments
Using a custom keyring seems like a reasonable approach, depending on complexity. |
For a custom keyring, I recommend the following command line options (quoted here from my blog):
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Responsible Disclosure Timeline
Bypassing signature verification in install.sh
The basic issue is that the E2E signature verification in yarn's install.sh script does not do certificate pinning. Any key in the local keyring or automatically downloaded from keyservers will be accepted for verification. This is because the yarn release key is imported into the user's keyring and then gpg is called with "gpg --verify" not specifying either a minimal keyring with acceptable keys or parsing the output to check for a valid signature by a particular key.
Mitigation
Mititagion is not easy, as GnuPG lacks friendly interfaces for the intended use case. Some options include a temporary home directory, specifying a custom keyring, or parsing the status lines output. See my blog entry for details.
Impact
The impact is dependent on what the signature is supposed to protect. The first line of defense for yarn surely is HTTPS, and that means that the impact of this bug is probably small in practice. But I can't tell for sure. It is possible that the E2E signature verification protects some nightly build servers or so.
The text was updated successfully, but these errors were encountered: