[GHSA-8623-9fwr-4cxv] Quick-Media Batik Codec FIX package has Code Injection vulnerability#7437
Open
carlosame wants to merge 1 commit intocarlosame/advisory-improvement-7437from
Open
Conversation
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.
Updates
Comments
All the explanation that is given about this vulnerability is a patch (liuyueyi/quick-media@e52fcee) which results in a compilation error. The code which was patched was correct:
https://github.com/liuyueyi/quick-media/blob/f600bc7960f957df4c4d53c3bb414c571f4c190d/plugins/svg-plugin/batik-codec-fix/src/main/java/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java#L91-L93
and the
PNGImageEncoder.javafile cannot be compiled after the patch, because it references abufferfield which is not there. Actually, that tree is not even compiled during thequick-mediabuild so no one noticed. The patch was most likely intended to apply to a differentwritemethod:https://github.com/liuyueyi/quick-media/blob/f600bc7960f957df4c4d53c3bb414c571f4c190d/plugins/svg-plugin/batik-codec-fix/src/main/java/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java#L238
But even if the checks were added there, the practical difference would be that in case of a negative
lenthe code would silently do nothing instead of throwing an exception, which is what it is supposed to do. The security implications are unclear, if any (again we are talking about a file which is not part of the deliverables of that project).This "Code Injection vulnerability" is bogus.