Sanitize partner Message-ID used as inbound payload filename fallback - #564
Merged
uhurusurfa merged 2 commits intoJul 25, 2026
Merged
Conversation
When a received message has no content-disposition filename and no configured filename fallback property, the payload filename fell back to the raw Message-ID header, which is partner-controlled. Unlike the content-disposition path (which runs through IOUtil.getSafeFilename), this fallback was unsanitized, allowing a crafted Message-ID to influence the stored file path (path traversal). Run the fallback through IOUtil.getSafeFilename, and use a safe generated name if the Message-ID cannot be made safe. The sanitization primitive is already covered by FilenameSafetyTest.
Contributor
|
Remove the as2_certs.p12 from your PR's as it is just wasting time with conflict resolution. It is not necessary to commit the new one generated by the build script every time. |
Contributor
Author
Done |
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.
When a received message has no content-disposition filename and no configured filename fallback property, the payload filename fell back to the raw Message-ID header, which is partner-controlled. Unlike the content-disposition path (which runs through IOUtil.getSafeFilename), this fallback was unsanitized, allowing a crafted Message-ID to influence the stored file path (path traversal).
Run the fallback through IOUtil.getSafeFilename, and use a safe generated name if the Message-ID cannot be made safe. The sanitization primitive is already covered by FilenameSafetyTest.