/

CVE-2026-92784

Severity:

HIGH RISK

(7.5)

Code Injection (CWE-94) in Refine Inferencer Component

CVE-2026-92784

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Client-Side JavaScript Execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

@refinedev/inferencer through version 7.0.0 does not properly escape API field names before inserting them into generated JSX source code. If an attacker controls the data provider and supplies crafted JSON property names, malicious JavaScript may execute in a developer's browser when the Inferencer page renders.

Affected context

The vulnerability occurs in Refine Inferencer deployments that generate JSX source code from API metadata or JSON property names without treating those names as untrusted input. Risk is present when a data provider can be influenced by an attacker and the generated Inferencer output is rendered in a developer's browser.

Exploit preconditions

  • Attack surface: The Inferencer page and its generated JSX source code
  • Required access: Ability to control or influence data returned by the configured data provider
  • Trigger point: Rendering an Inferencer page that processes attacker-controlled JSON property names
  • Why exploitation is possible: Field names are interpolated into generated JavaScript or JSX without sufficient escaping or contextual encoding

Why this happens

The underlying bug is an unsafe code-generation pattern in which externally influenced API field names are inserted directly into JSX source code. Because the generated content is interpreted as JavaScript rather than treated solely as data, specially crafted property names can alter program structure or introduce executable expressions. This maps to CWE-94: Improper Control of Generation of Code ('Code Injection').

Potential impact

  • Malicious JavaScript could execute in a developer's browser
  • Session data or locally accessible application information may be exposed
  • Developer actions could be performed within the affected browser context
  • Generated source code or development workflows could be manipulated
  • Additional internal systems may be targeted through the developer's authenticated browser session

General mitigation guidance

Mitigation generally focuses on separating data from generated code and reducing trust in metadata supplied by data providers.

Common defensive patterns include:

  • Escaping or encoding field names for the exact JavaScript and JSX context in which they are inserted
  • Generating code through structured abstractions rather than string interpolation where possible
  • Allowlisting valid identifier formats and rejecting unexpected property names
  • Treating data-provider responses as untrusted input, even in development environments
  • Applying least privilege to developer sessions and data-provider credentials
  • Rendering generated content in an isolated context when direct code generation cannot be avoided

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for string interpolation into JavaScript, JSX, or template-generated source code
  • Code review checks for API fields, object keys, or metadata inserted into executable syntax
  • Tests using unusual, reserved, and delimiter-containing property names
  • Dependency and policy checks for unsafe code-generation patterns in frontend tooling
  • Browser security monitoring for unexpected script execution or outbound requests from developer tools

Automated code review and security scanning tools can help identify unescaped data flowing into generated source code.

Sources

SourceLink
github.comgithub.com/refinedev/refine
github.comgithub.com/refinedev/refine/blob/main/packages/inferencer/src/create-inferencer/index.tsx#L117-L128
github.comgithub.com/refinedev/refine/blob/main/packages/inferencer/src/inferencers/antd/list.tsx#L140-L144
github.comgithub.com/refinedev/refine/issues/7556
vulncheck.comvulncheck.com/advisories/refinedev-inferencer-through-7.0.0-code-injection-via-api-field-names

Frequently asked

questions

It can be exploitable through a remote or network-accessible data provider when an attacker can influence JSON property names and a developer later renders the affected Inferencer page.

The attacker generally needs control over, or the ability to tamper with, data returned by the configured data provider. Direct access to the developer's browser is not necessarily required.

Keep external field names as data, apply context-appropriate escaping or strict allowlisting, and avoid constructing executable JSX or JavaScript through untrusted string interpolation.

Combine secure code-generation practices with input validation, adversarial tests for metadata fields, least-privilege development environments, and automated checks for untrusted data entering executable contexts.

Find out what's already
exploitable in your codebase.