/

CVE-2026-35178

Severity:

CRITICAL RISK

(9.8)

Code Injection in Salesforce Workbench Timezone Conversion

CVE-2026-35178

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

A code injection vulnerability in Salesforce Workbench's timezone conversion flow allows attacker-controlled cookie values to be processed in an unsafe way, enabling arbitrary code execution on the server.

When an attacker can influence specific cookies sent to Workbench, they may be able to trigger remote code execution under the context of the Workbench application.

Affected context

This vulnerability occurs within Salesforce Workbench, specifically in the server-side timezone conversion logic that reads and processes values from HTTP cookies.

It becomes relevant in deployments where:

  • Workbench is exposed over HTTP(S) to users or integrated tools
  • Cookie values affecting localization or timezone handling are accepted and processed on the server
  • Application logic evaluates or incorporates cookie data into executable code paths or dynamic expressions

The issue does not depend on a particular OS or infrastructure stack, but rather on how the application logic uses attacker-controlled cookie data.

Exploit preconditions

  • Attack surface: HTTP(S) interface of Salesforce Workbench
  • Required access: Ability to send crafted HTTP requests with controlled cookie values to a vulnerable Workbench instance
  • Trigger point: Invocation of the timezone conversion flow that reads and processes the attacker-supplied cookie
  • Why exploitation is possible: The timezone conversion logic treats cookie data as code or embeds it into dynamically evaluated constructs without sufficient validation, encoding, or contextual separation, allowing injection of arbitrary code.

Why this happens

The underlying flaw is a classic code injection pattern aligned with CWE-94: Improper Control of Generation of Code ('Code Injection').

In the timezone conversion flow, the application consumes cookie values that are under client control and incorporates them into server-side processing in a way that permits dynamic code generation or evaluation.

Instead of treating cookie data as pure, inert data, the logic likely:

  • Concatenates it into code-like strings,
  • Passes it to an evaluation or compilation mechanism, or
  • Uses it to influence dynamically constructed function calls or expressions.

Because these steps occur without strict input constraints or safe APIs, an attacker can craft cookie values that alter the intended control flow and inject executable code.

Potential impact

  • Execution of arbitrary server-side code within the Workbench process
  • Full compromise of the Workbench application environment and its data
  • Unauthorized access to Salesforce organization data reachable through Workbench APIs
  • Use of the compromised server as a pivot point for further network attacks
  • Tampering with administrative operations or automation performed via Workbench
  • Potential exposure of credentials, API tokens, or configuration secrets handled by Workbench

General mitigation guidance

Effective mitigation centers on eliminating any pathway that allows untrusted data to influence executable code or dynamic evaluation.

Recommended defensive patterns include:

  • Treat cookies strictly as data: Ensure cookie values are never passed into eval-like mechanisms, expression parsers, or dynamic code generators.
  • Use fixed logic for timezone handling: Implement timezone conversion using established libraries and static mappings rather than dynamically built expressions driven by user input.
  • Input validation and normalization: Apply strict allowlists for timezone-related parameters, accepting only recognized identifiers and rejecting or defaulting unexpected values.
  • Contextual encoding and separation: If values must be embedded in structured templates or expressions, use context-appropriate encoding and avoid mixing control tokens with user input.
  • Least privilege and isolation: Run Workbench with minimal system privileges, isolate it from other sensitive services where possible, and limit filesystem and network access to reduce blast radius if a flaw is exploited.
  • Secure defaults for localization: Prefer server-side, configuration-driven localization and timezone policies over user-controlled values, especially via cookies.

How teams detect issues like this

Detection typically involves both code-centric and operational approaches:

  • Static analysis: Use rules that flag:
  • Use of dynamic evaluation functions or expression interpreters that consume HTTP headers or cookie data
  • String concatenation of user-controlled values into code-like constructs (e.g., dynamic function names or expressions)
  • Code review focus areas:
  • Localization and timezone utilities that parse cookies or headers
  • Any logic where cookies influence control flow, method names, or template selection
  • Use of generic dynamic execution helpers in request-handling paths
  • Runtime monitoring:
  • Application logs for anomalous errors in timezone or localization routines
  • Security monitoring for unusual requests with suspiciously structured cookie values
  • Policy enforcement:
  • CI/CD checks that disallow use of eval-style patterns on any user-supplied data
  • Coding guidelines that treat cookies as untrusted input equivalent to request parameters

Sources

SourceLink
github.comgithub.com/forceworkbench/forceworkbench/pull/869
github.comgithub.com/forceworkbench/forceworkbench/security/advisories/GHSA-jw63-m86r-2jxc

Frequently asked

questions

Yes. Because the vulnerability is triggered via HTTP cookies, an attacker can typically exploit it remotely by sending crafted requests to a reachable Workbench instance.

The attacker needs the ability to interact with the Workbench HTTP interface and control certain cookie values. In many deployments this may require only network access to the application; additional authentication requirements depend on how the instance is configured.

Remove any use of dynamic code generation or evaluation driven by user-controlled data, especially cookies and headers. Refactor timezone and localization logic to rely on static libraries, fixed mappings, and strict allowlists rather than dynamically built expressions.

Establish development standards that prohibit eval-style constructs on request data, enforce code review checklists around localization and configuration flows, integrate static analysis for code injection patterns, and treat all client-supplied inputs—including cookies—as untrusted and subject to strict validation and contextual encoding.

Find out what's already
exploitable in your codebase.