Hacker discovers GitHub token leak in JetBrains’ IntelliJ IDE

JetBrains Company warned customers to fix a critical vulnerability that affects users of the IntelliJ IDE and allows access to GitHub tokens.

The vulnerability is tracked under CVE-2024-37051 and affects all IntelliJ-based IDEs starting with version 2023.1 that have the JetBrains GitHub plugin enabled, configured, or using it.

“On May 29, 2024, we received a report of a possible vulnerability that could affect pull requests in the IDE,” said Ilya Pleskunin, head of the security support team at JetBrains. “Thus, malicious content contained in a pull request for GitHub and processed by an IntelliJ-based IDE may result in the transfer of access tokens to a third-party host.”

JetBrains has already released patches to fix the critical issue in version 2023.1 or later. The company also fixed the vulnerable JetBrains GitHub plugin and removed all previously affected versions from its official plugin marketplace.

The full list of fixed versions includes:

  • Aqua: 2024.1.2
  • CLion: 2023.1.7, 2023.2.4, 2023.3.5, 2024.1.3, 2024.2 EAP2
  • DataGrip: 2024.1.4
  • DataSpell: 2023.1.6, 2023.2.7, 2023.3.6, 2024.1.2
  • GoLand: 2023.1.6, 2023.2.7, 2023.3.7, 2024.1.3, 2024.2 EAP3
  • IntelliJ IDEA: 2023.1.7, 2023.2.7, 2023.3.7, 2024.1.3, 2024.2 EAP3
  • MPS: 2023.2.1, 2023.3.1, 2024.1 EAP2
  • PhpStorm: 2023.1.6, 2023.2.6, 2023.3.7, 2024.1.3, 2024.2 EAP3
  • PyCharm: 2023.1.6, 2023.2.7, 2023.3.6, 2024.1.3, 2024.2 EAP2
  • Rider: 2023.1.7, 2023.2.5, 2023.3.6, 2024.1.3
  • RubyMine: 2023.1.7, 2023.2.7, 2023.3.7, 2024.1.3, 2024.2 EAP4
  • RustRover: 2024.1.1
  • WebStorm: 2023.1.6, 2023.2.7, 2023.3.7, 2024.1.4

Administrators are strongly encouraged to patch and revoke GitHub tokens as soon as possible. The company also strongly recommends that customers actively using the GitHub pull request functionality in the IntelliJ IDE revoke any GitHub tokens used by the affected plugin, as they could provide potential attackers with access to associated GitHub accounts (even if additional protection in the form of two-factor authentication is enabled).

Additionally, if the plugin was used with OAuth or Personal Access Token (PAT) integration, you should revoke JetBrains IDE Integration access and remove the IntelliJ IDEA Integration Plugin token from GitHub. It is emphasized that after revoking the token, you will have to reconfigure the plugin, since all its functions (including operations with Git) will stop working.

In addition to creating the patch, JetBrains contacted GitHub developers to help mitigate the impact of the vulnerability. Therefore, due to the measures taken, the JetBrains GitHub plugin may not work correctly in older versions of the JetBrains IDE.