[PM-36584] Bidirectional C2 in icons.bitwarden.net#7668
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR closes a bidirectional C2 channel through icons.bitwarden.net by walking PNG chunk lists and only keeping rendering-essential chunks (IHDR, PLTE, IDAT, IEND, tRNS, sRGB, gAMA, cHRM), applying the same logic to PNG frames embedded in ICO files, and dropping SVG from the proxy's allowed media types. All previously raised concerns — fail-open on malformed chunks, the dead Code Review DetailsNo new findings. All previously raised issues have been resolved. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7668 +/- ##
==========================================
+ Coverage 59.98% 60.09% +0.11%
==========================================
Files 2133 2132 -1
Lines 93731 93985 +254
Branches 8311 8355 +44
==========================================
+ Hits 56220 56479 +259
+ Misses 35531 35514 -17
- Partials 1980 1992 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



🎟️ Tracking
jira
📔 Objective
strip PNG metadata chunks
In IconLink.cs, FetchAsync just returns the raw bytes. Before we hand them back, we should walk the PNG chunk list and only keep the ones we actually need for rendering:
Keep: IHDR, PLTE, IDAT, IEND, tRNS, sRGB, gAMA, cHRM
Drop everything else. That kills tEXt/iTXt/zTXt and anything else an attacker might try. PNG chunk structure is simple (4-byte length, 4-byte type, data, CRC). Apply the same logic to PNG frames embedded inside ICO files.
Also drop SVG support from the proxy