All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Composer vulnerability leaks GitHub Actions GITHUB_TOKEN in logs due to format mismatch

By

damienwebdev

18d ago· 3 min readenCode

Summary

A security vulnerability has been identified where Composer leaks the full contents of GitHub OAuth tokens (specifically GITHUB_TOKEN) to stderr logs when the tokens don't match Composer's expected format. GitHub introduced a new GITHUB_TOKEN format that includes a hyphen, which fails Composer's validation and causes the token to be disclosed in logs. This issue is amplified because many widely-used GitHub Actions (like shivammathur/setup-php) automatically register GITHUB_TOKEN into Composer's global auth.json, meaning the leak can trigger without any unusual user configuration.

Key quotes

· 4 pulled
Composer leaks the full contents of tokens configured as GitHub OAuth tokens if they do not match Composer's expected format for such tokens to stderr.
GitHub has introduced a new format for GitHub Actions GITHUB_TOKEN values.
The new format including a - (hyphen) fails Composer's validation and leads to disclosure of the GITHUB_TOKEN in logs.
Many widely-used Actions (e.g. shivammathur/setup-php) auto-register GITHUB_TOKEN into composer's global auth.json, so the leak triggers without any unusual user configuration.
Snippet from the RSS feed
### Summary Composer leaks the full contents of tokens configured as GitHub OAuth tokens if they do not match Composer's expected format for such tokens to stderr. GitHub has introduced a new fo...

You might also wanna read