脆弱性データベースGHSA-ccgf-5rwj-j3hv

GHSA-ccgf-5rwj-j3hv
JavaScript 脆弱性の分析と軽減

Summary

telejson versions prior to 6.0.0 (released 2022) are vulnerable to DOM-based Cross-Site Scripting (XSS) through unsafe deserialisation. Attacker-controlled input from the _constructor-name_ property in parsed JSON is passed directly to new Function() without sanitisation, allowing arbitrary JavaScript execution.

Affected versions

PackageAffectedFixed
telejson< 6.0.0>= 6.0.0

Details

telejson's parse() function uses a custom reviver to reconstruct JavaScript objects from serialised JSON. When processing objects with a _constructor-name_ property, the reviver passes the constructor name directly to new Function() to recreate the object's prototype.

In versions prior to 6.0.0, this constructor name is not sanitised. An attacker who can deliver a crafted JSON payload to telejson.parse() (for example, via postMessage in applications that use telejson for cross-frame communication) can inject arbitrary JavaScript into the new Function() call.

Vulnerable code (src/index.ts, lines 293-299 at v5.3.3):

if (isObject<ValueContainer>(value) && value['_constructor-name_']) {
  const name = value['_constructor-name_'];
  if (name !== 'Object') {
    const Fn = new Function(`return function ${name}(){}`)();
    Object.setPrototypeOf(value, new Fn());
  }

Fixed code (src/index.ts, lines 340-346 at v6.0.0):

if (isObject<ValueContainer>(value) && value['_constructor-name_'] && options.allowFunction) {
  const name = value['_constructor-name_'];
  if (name !== 'Object') {
    const Fn = new Function(`return function ${name.replace(/[\W_]+/g, '')}(){}`)();
    Object.setPrototypeOf(value, new Fn());
  }

The fix introduces two mitigations: a character allowlist via regex that strips non-word characters before they reach new Function(), and gating the entire code path behind the allowFunction option.

Impact

An attacker can execute arbitrary JavaScript in the context of the application using the vulnerable telejson version. Depending on the application, this could enable session hijacking, credential theft, or arbitrary DOM manipulation.

Remediation

Upgrade to telejson >= 6.0.0.


ソースNVDの

関連 JavaScript 脆弱 性:

CVE 識別子

重大度

スコア

テクノロジー

コンポーネント名

CISA KEV エクスプロイト

修正あり

公開日

CVE-2026-39983HIGH8.6
  • JavaScriptJavaScript
  • basic-ftp
いいえはいApr 09, 2026
CVE-2026-39974HIGH8.5
  • JavaScriptJavaScript
  • n8n-mcp
いいえはいApr 09, 2026
CVE-2026-39942HIGH8.5
  • JavaScriptJavaScript
  • directus
いいえはいApr 09, 2026
CVE-2026-39943MEDIUM6.5
  • JavaScriptJavaScript
  • directus
いいえはいApr 09, 2026
CVE-2026-39315MEDIUM6.1
  • JavaScriptJavaScript
  • unhead
いいえはいApr 09, 2026

無料の脆弱性評価

クラウドセキュリティポスチャーのベンチマーク

9つのセキュリティドメインにわたるクラウドセキュリティプラクティスを評価して、リスクレベルをベンチマークし、防御のギャップを特定します。

評価を依頼する

パーソナライズされたデモを見る

実際に Wiz を見てみませんか?​

"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
デビッド・エストリックCISO (最高情報責任者)
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
アダム・フレッチャーチーフ・セキュリティ・オフィサー
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"
グレッグ・ポニャトフスキ脅威および脆弱性管理責任者