Repository navigation
Conversation
wheel info prints WHEEL and METADATA header values (and archive member names with --verbose) verbatim, main() prints WheelError messages that embed strings read from RECORD, and wheel pack echoes a file name assembled from the unpacked .dist-info directory name and WHEEL tags. A crafted wheel can use these to emit ANSI/OSC escape sequences into the terminal of whoever inspects it (clipboard writes via OSC 52, hidden or overwritten output lines). Replace non-printable characters with their printable backslash escapes at these output sites.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #708 +/- ##
==========================================
+ Coverage 63.54% 63.84% +0.30%
==========================================
Files 15 15
Lines 1270 1278 +8
==========================================
+ Hits 807 816 +9
+ Misses 463 462 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wheel infois typically run on a wheel you don't trust yet, and it prints the WHEEL and METADATA header values, plus the archive member names with--verbose, exactly as they appear inside the archive. Nothing filters control characters, so a crafted wheel decides what the inspecting terminal gets to see: aSummaryofinnocent\x1b]52;c;aGFja2Vk\x07writes the clipboard of OSC 52 capable terminals, and CSI sequences can hide or overwrite neighbouring output lines, letting the displayed metadata lie about the dependencies being shown (CWE-150, the class kubectl fixed as CVE-2021-25743). The same strings reach the terminal through two other spots:main()printsWheelErrormessages that embed text read from the archive, such as the hash algorithm name from RECORD, andwheel packechoes a file name assembled from the unpacked.dist-infodirectory name and the WHEEL tags. The fix replaces non-printable characters with their printable backslash escapes at those output sites, sowheel infoon the wheel above now shows the escape sequence as literal text instead of executing it. Messages that only echo paths the user already typed on the command line are left as they are. Includes a regression test covering the metadata fields, the verbose file listing and the error path, and a news entry.