Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. petite-vue-i18n
  4. ›
  5. CVE-2024-52809

CVE-2024-52809: vue-i18n has cross-site scripting vulnerability with prototype pollution

December 2, 2024

vue-i18n can be passed locale messages to createI18n or useI18n. we can then translate them using t and $t. vue-i18n has its own syntax for local messages, and uses a message compiler to generate AST. In order to maximize the performance of the translation function, vue-i18n uses bundler plugins such as @intlify/unplugin-vue-i18n and bulder to convert the AST in advance when building the application. By using that AST as the locale message, it is no longer necessary to compile, and it is possible to translate using the AST.

The AST generated by the message compiler has special properties for each node in the AST tree to maximize performance. In the PoC example below, it is a static property, but that is just one of the optimizations. About details of special properties, see https://github.com/intlify/vue-i18n/blob/master/packages/message-compiler/src/nodes.ts

In general, the locale messages of vue-i18n are optimized during production builds using @intlify/unplugin-vue-i18n, so there is always a property that is attached during optimization like this time. But if you are using a locale message AST in development mode or your own, there is a possibility of XSS if a third party injects.

References

  • github.com/advisories/GHSA-9r9m-ffp6-9x4v
  • github.com/intlify/vue-i18n
  • github.com/intlify/vue-i18n/commit/72f0d323006fc7363b18cab62d4522dadd874411
  • github.com/intlify/vue-i18n/commit/9f20909ef8c9232a1072d7818e12ed6d6451024d
  • github.com/intlify/vue-i18n/security/advisories/GHSA-9r9m-ffp6-9x4v
  • nvd.nist.gov/vuln/detail/CVE-2024-52809

Code Behaviors & Features

Detect and mitigate CVE-2024-52809 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 10.0.0 before 10.0.5

Fixed versions

  • 10.0.5

Solution

Upgrade to version 10.0.5 or above.

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/petite-vue-i18n/CVE-2024-52809.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:07 +0000.