Repository navigation
docs(security): warn that remote images are allowed by default and show how to restrict them - #658
Merged
farnabaz merged 1 commit intoOct 14, 2026
Conversation
…ow how to restrict them The default rehype-harden config allows images from any origin, so a prompt-injected model can exfiltrate data via . Add a prominent warning, fix the Restricting Images example (it omitted the required defaultOrigin and would throw), note that omitting rehype-raw does not restrict Markdown images, and add tests pinning the default and the recommended hardened config. Refs vercel#640
Contributor
|
@Louayzouaoui1 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description
Documents that Streamdown renders remote images by default and shows how to restrict them, instead of changing the default. Related to #640 (docs-only follow-up, as discussed there: a restrictive default would be a breaking change and needs a maintainer decision on
defaultOrigin).Type of Change
Related Issues
Related to #640
Changes Made
security.mdx: states clearly that remote images are allowed by default and that omittingrehype-rawdoes not restrict Markdown images ().security.mdx: explains that non-matching images are never requested, and thatrehype-hardenrequiresdefaultOriginwhenallowedImagePrefixes/allowedLinkPrefixesare restricted.configuration.mdx: one-line pointer to the restriction section.allowedImagePrefixesblocks the request for both Markdown and raw<img>) so the docs cannot drift from the code.Testing
Checklist
pnpm changeset)