fix(deps): update dependency image-size to v1.2.1 [security] #32
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.
This PR contains the following updates:
1.1.1
->1.2.1
GitHub Vulnerability Alerts
GHSA-m5qc-5hw7-8vg7
Summary
image-size
is vulnerable to a Denial of Service vulnerability when processing specially crafted images.The issue occurs because of an infine loop in
findBox
when processing certain images with a box with size0
.Details
If the first bytes of the input does not match any bytes in
firstBytes
, then the package tries to validate the image using other handlers:Some handlers that call
findBox
to validate or calculate the image size arejxl
,heif
andjp2
.JXL
handler callsfindBox
insidevalidate
. To reach thefindBox
call, the value at position4:8
should be'JXL '
findBox
can lead to an infinite loop because the value ofbox.size
is0
, thus theoffset
variable is not updated. Below relevant code with comments (using one of thePAYLOAD
below as example):A similar issue occurs for
HEIF
andJP2
handlers:PoC
Usage:
node main.js poc1|poc2
[email protected]
[email protected]
[email protected]
Impact
Denial of Service
Release Notes
image-size/image-size (image-size)
v1.2.1
Compare Source
Fixes
Full Changelog: image-size/image-size@v1.2.0...v1.2.1
v1.2.0
Compare Source
This release adds support for JPEG-XL ( #409 )
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.