chore: bump the production-dependencies group with 3 updates
Type: Pull Request
State: Open
Association: Unknown
Comments: 4
(about 5 hours ago)
(about 5 hours ago)
deps npm area:reader area:build area:worker
Bumps the production-dependencies group with 3 updates: hono, parse5 and postcss.
Updates hono from 4.13.17 to 4.13.18
Release notes
Sourced from hono's releases.
v4.13.18
Security fixes
This release includes fixes for the following security issues:
validator()skips validation for requests whoseContent-Typeparameters are formatted differentlyAffects:
validator('json')andvalidator('form')inhono/validator. AContent-Typewith whitespace before;, a trailing;, or an unusual parameter name was not recognized, so the validator saw an empty object while the handler could read all fields. This completes the fix for GHSA-4h7h-rv7c-7m2v. The validator now decides by the media type alone, asc.req.parseBody()does. GHSA-92p4-j3wq-jmqx
bodyLimit()keeps every transfer chunk of a request body in memoryAffects:
bodyLimit()inhono/body-limit. A body sent in very small transfer chunks was retained as one object per chunk, so a request within the configured limit could exhaust memory. The body is now buffered in one array bounded bymaxSize. GHSA-39q9-qp46-w8xg
mount()andapp.mount()forward a wrong path when a customgetPathadds a prefixAffects:
mount()inhono/mountandapp.mount()on 4.13.16 and 4.13.17. With agetPaththat prepends a prefix such as the host name, one segment too many was removed from the forwarded path, so middleware scoped inside the mount prefix could be skipped. The prefix is removed from the routed path again. Paths that would change meaning when forwarded now get 400, and an optional regular expression parameter in a mount path throws. GHSA-h25j-2p75-qj33
serveStatic()serves a path that was decoded twice whenallowPercentInPathis enabledAffects:
serveStatic()inhono/serve-staticand the runtime adapters, only withallowPercentInPath: true. A malformed percent escape in the request path was decoded a second time, so a path that middleware registered on the encoded form did not see could still reach a static file. The file path must now be the same as the routed path, and otherwise the response is 404. GHSA-74fm-fwc7-3fwp
Users who rely on
validator(),bodyLimit(),mount()with a customgetPath, orserveStatic()withallowPercentInPathare strongly encouraged to upgrade to this version.Full Changelog: https://github.com/honojs/hono/compare/v4.13.17...v4.13.18
Commits
Updates parse5 from 8.1.0 to 8.1.1
Release notes
Sourced from parse5's releases.
v8.1.1
This release fixes nineteen security-relevant issues in the tokenizer, serializer, SAX parser, rewriting stream, tree adapters and tree construction, reported by outside researchers and by Anthropic, and further issues of the same kinds found while reviewing them. The issues include crashes from a few bytes of input, parse time and memory far out of proportion to the input, and serializer output that re-parses into markup the parsed tree did not contain. Everyone who runs parse5 on untrusted input should update.
There are no CVEs or GitHub security advisories for these issues: private vulnerability reporting on this repository is only accessible to
@inikulin. The current maintainers cannot access it, so the reports could not be filed or published as advisories here.Security fixes
9b57bf87High: a crash from two code units. A lone low surrogate followed by another low surrogate was decoded as a pair, andString.fromCodePointthen threw out of every parser entry point. Only a high surrogate now starts a pair. Reported by Joshua Rogers and by Anthropic.98a4bb34High: a crash, also through cheerio's$.html(). Serialization recursed once per DOM level, so a few KB of nesting exhausted the call stack. It now uses an explicit stack, and the output is unchanged byte for byte. Reported by SnailSploit.ea240155High: quadratic parse time. The SAX parser's namespace stack was shifted from the front for every element, quadratic in the nesting. It is kept at its tail. Reported by iaohkut, José Antonio Zamudio Amaya and Ravindu Lakmina.fa1eb9b0High: a crash, and quadratic time before it. Nested templates were closed recursively at EOF, and the template insertion-mode stack was shifted per template. Both are iterative now. Reported by SnailSploit and by the three reporters above.20591465High: quadratic parse time. Foster parenting scanned all preceding siblings of the table for every insertion. The reference is found without scanning. Reported by iaohkut, José Antonio Zamudio Amaya and Ravindu Lakmina.6c705d57High: 8,002,000 attribute records from 39 KB of input. Integration-point checks read the attribute list of every element, which the htmlparser2 adapter allocates on each call. Onlyannotation-xmlneeds it, and its list is now read once per element, as the HTML Standard decides by the start tag (rereading it on every pop took 7 s for 8,000 attributes and children; a script that editsencodingmid-parse no longer changes the verdict, stated in the commit). Reported by Anthropic; the rereads on every pop were found while reviewing this series.0a61bd54High: 210 ms from 35 KB, growing quadratically.adoptAttributesrebuilt the recipient's name Set for an empty merge, so repeated<html>and<body>tags without attributes were quadratic. It returns early. Tags that each add an attribute rebuilt it too (816 ms for 8,000<html>tags), so the adapter now keeps the names between merges and re-indexes when the list changed under it; a script that renames an attribute between two merges to a name the cache has never seen is the one documented difference (stated in the commit). Reported by iaohkut, José Antonio Zamudio Amaya and Ravindu Lakmina; the merges that add attributes were found while reviewing this series.89dceda8High: a crash and mutation XSS. Resetting the insertion mode matched foreign elements by tag id, so an SVGselectortemplateselected an HTML mode; aTypeErrorfollowed from 50 bytes, and a longer shape serialized into an<img onerror>absent from the tree. Foreign elements are skipped. Reported by Anthropic.f5d58d8fHigh: quadratic parse time from formatting tags. Formatting tags with distinct attributes (<b a=1><b a=2>…) made every insertion into the list of active formatting elements scan the list for Noah's Ark, and formatting end tags scanned and spliced it. The list is now linked and indexed by tag and by attributes, so insertion costs the tag's attributes and removal and lookup are constant. An attribute group leaves the index with its last entry, so the index does not grow with the distinct attribute sets of the input. Reported by Liyi Zhou, Ziyue Wang, Strick Sheng, Maurice Ng and Chenchen Yu (University of Sydney), and by Anthropic.e2901d06High: 13–18 s from 300 KB, also through cheerio's.append(),.html()and$(). Moving a node's children (everyparseFragmentresult out of its root, the adoption agency's furthest block) detached them one at a time from the front of the child list, quadratic in their number. The children are copied once, detached from the end and appended in order, and both bundled adapters check the last child before searching the list, asinsertBeforealready did; the adapter interface is unchanged.parseFragmentof 100,000<b></b>: 4.1 s → 45 ms. Reported by Anthropic.fcce48d0High: the reported deep-nesting quadratic. Every search of the stack of open elements cost up to its depth per token: scope checks, list items, generic end tags, insertion-mode resets, end tags in foreign content, foster parenting and the adoption agency's up to eight passes per end tag. 391 KB of nested<div>s took 23.7 s, and 256 repetitions of<b>, 255<span><div>pairs and 33</b>took 17.2 s from 735 KB. Once 64 elements are open, the stack indexes them by tag and counts the special elements and scope boundaries at or below each, so every search is constant per token, and the adoption agency leaves a removed element's slot free instead of shifting the stack; the two documents take 39 ms and 104 ms. Stacks that never reach 64 elements are scanned as before; a stack that does keeps the index for the rest of the parse and pays for it on every push and pop (300 nested tables parse about 20% slower). Reported by iaohkut, José Antonio Zamudio Amaya and Ravindu Lakmina; the adoption-agency and foreign-content cases were found while reviewing this series.- #1922 High: quadratic tokenizer time from a tag with many attributes. The duplicate-attribute check compared every new name with every earlier one; tags with more than 64 attributes now use a set. Reported by SameerJS6 in #1901.
53d1261cMedium: a script-stripping rewriter misses a script. When the parsed chunk was dropped between the two code points of a character reference, input after the reference was skipped: no tag events for it, whileRewritingStreamforwarded its raw bytes. The position is recomputed from the current buffer. Reported by Anthropic.4bffbe64Medium: a filter bypass once the output is embedded in a page. At EOF inside a tag, the pending text's source range covered the dropped tag, soRewritingStreamforwarded an unfinished tag that no listener saw. The text now ends where the tag starts. Reported by Anthropic.e02abba4Medium: XSS through the rewriter.RewritingStream#emitTextchose raw output fromlastStartTagName, so text after</script>, before<script>or in an SVG<style>was written unescaped and entity-encoded input became live markup. It now tracksinRawTextfrom the tokenizer state. Reported by Joshua Rogers and by Anthropic.ac2f60d5Medium: memory proportional to an uncapped stream. The streaming parsers kept a whole run of text as one pending token until a tag; memory grew with the stream. Completed text is flushed when a parsed chunk is dropped, with exact source ranges, in every state without an unfinished token, so a stream whose every chunk ends inside a CDATA]], a named reference or an escaped-script<is flushed too and only the pending construct stays buffered. Reported by Liyi Zhou, Ziyue Wang, Strick Sheng, Maurice Ng and Chenchen Yu (University of Sydney); the chunks ending in a delimiter or reference were found while reviewing this series.fd22254cMedium: mutation XSS. The adoption agency acted on an older formatting element behind a scope boundary and moved the boundary element; the serialized tree re-parsed into an<img>absent from the input. It runs on the identified element. Reported by Anthropic.61676e2bMedium, for consumers that inspect parse5's tree and forward the original bytes. Implied end tags popped foreign elements, so a</form>closed an SVGrpand parse5 read raw text where browsers see an<img onerror>. HTML elements only. Reported by Anthropic.b9093da5Medium, same consumer pattern. Foreign end tags were matched withtoLowerCase, which folds U+212A KELVIN SIGN tok; the wrong ancestors stayed open and parse5 hid an<img>browsers render. Matching is ASCII case-insensitive. Reported by Anthropic.69f69313Medium, same consumer pattern. In a fragment, an unmatched foreign end tag was dropped at the root instead of being processed with the HTML rules, so a</form>did not reset the form pointer and a later<form action=javascript:…>was missing from the fragment. Reported by Anthropic.d5f4f129Medium, same consumer pattern. A fragment context's SVGformancestor was taken as the form element pointer, suppressing the fragment's HTML form. Only an HTMLformqualifies. Found while reviewing this series.48aba8cbLow: a self-closing<svg/>or<math/>left its namespace frame in the SAX simulator, so a stream of such roots grew the frame stack without bound and following content was tokenized as foreign; integration-point end tags now close only the frame their element opened. Frames also follow tree construction forsvgandmathinside the other foreign namespace,mglyphandmalignmarkin a MathML text integration point, and</p>and</br>. Found while reviewing this series.f52fa37fDocumentation.SECURITY.mdnow says that the current maintainers cannot see reports filed through GitHub's private vulnerability reporting, and that Tidelift is the only channel for reports.Other changes
- docs: add usage examples for four parse5 packages by
@Sinklebergin inikulin/parse5#1878- fix(plain-text): default to the standard tree adapter types by
@xiehuanyiin inikulin/parse5#1883- fix(parser-stream): require parse5 ^8.1.0 by
@scttcperin inikulin/parse5#1916- chore: v8.1.1 by
@fb55in inikulin/parse5#1926New Contributors
@Sinklebergmade their first contribution in inikulin/parse5#1878@xiehuanyimade their first contribution in inikulin/parse5#1883@scttcpermade their first contribution in inikulin/parse5#1916Packages
parse58.1.1,parse5-sax-parser8.0.1,parse5-html-rewriting-stream8.1.1,parse5-htmlparser2-tree-adapter8.0.2,parse5-parser-stream8.1.1,parse5-plain-text-conversion-stream8.0.1. The dependent packages require the fixedparse5.Full Changelog: https://github.com/inikulin/parse5/compare/v8.1.0...v8.1.1
Commits
8eea616chore: v8.1.1 (#1926)fcce48dperf(parser): find open elements without scanning a deep stacke2901d0perf(parser): move children between nodes without shifting the listf5d58d8perf(parser): find and remove formatting list entries in constant time48aba8cfix(sax-parser): enter and leave foreign namespaces where tree construction doesf52fa37docs(security): name Tidelift as the only channel for reportsd5f4f12fix(parser): ignore a foreign form ancestor of the fragment context69f6931fix(parser): process unmatched foreign end tags at the root of a fragmentb9093dafix(parser): match foreign end tags ASCII case-insensitively61676e2fix(parser): generate implied end tags for HTML elements only- Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by fb55, a new releaser for parse5 since your current version.
Updates postcss from 8.5.32 to 8.5.33
Release notes
Sourced from postcss's releases.
8.5.33
- Fixed unquoted
url()with/*after a comma (by@MFA-G).- Fixed
url (…)with a space before the bracket being parsed as URL.- Fixed unquoted uppercase
URL()parsing (by@Don-Yin).- Fixed empty source in
CssSyntaxErroron long lines (by@simpleqt).- Fixed line breaks on source map annotation removal (by
@wozhenbang2004).- Fixed
Declaration#importanttypes (by@johnhldiver-beep).
Changelog
Sourced from postcss's changelog.
8.5.33
- Fixed unquoted
url()with/*after a comma (by@MFA-G).- Fixed
url (…)with a space before the bracket being parsed as URL.- Fixed unquoted uppercase
URL()parsing (by@Don-Yin).- Fixed empty source in
CssSyntaxErroron long lines (by@simpleqt).- Fixed line breaks on source map annotation removal (by
@wozhenbang2004).- Fixed
Declaration#importanttypes (by@johnhldiver-beep).
Commits
b6316e5Release 8.5.33 version0ffa3eeUpdate dependencies46ab74aMore proper fixba705bcfix: tokenize an unquoted url() after a comma (#2195)93452dbdocs: fix typo in plugin guidelines heading (#2196)812d362docs: remove unsupported postcss-sanitize plugin (#2192)4740f8aFix CRLF line break cleanup before source map annotations (#2187)2ab84ddfix: tokenize uppercase url() as a url (#2185)17e54b7fix: show source around long lines for errors without range (#2184)2faedf9fix: include undefined in Declaration.important getter type (#2181)- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions
Package Dependencies
Technical Details
| ID: | 16830877 |
| UUID: | 6441271901 |
| Node ID: | PR_kwDOR8Sen88AAAABPyAt3w |
| Host: | GitHub |
| Repository: | d-oit/do-epub-studio |