/

CVE-2022-35499

Severity:

HIGH RISK

(7.1)

Reflected XSS (CWE-79) in Trimble TM4WEB Bill Viewer

CVE-2022-35499

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Script Execution

Severity:

HIGH RISK

(7.1)

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

Trimble TM4WEB's external bill viewer endpoint reflects attacker-controlled URL parameters into a response without sufficient output encoding. If a victim opens a specially crafted link, script content may execute in the victim's browser within the application's security context.

Affected context

The vulnerability occurs in the external bill viewer endpoint of Trimble TM4WEB when an arbitrary parameter appended to the request URL is reflected into the returned page. Risk depends on the endpoint's response handling, the browser context of the victim, and whether the reflected value is encoded appropriately for its output location.

Exploit preconditions

  • Attack surface: The externally accessible bill viewer endpoint
  • Required access: Ability to send or distribute a crafted URL; authenticated access may or may not be required depending on deployment exposure
  • Trigger point: A victim loads the affected bill viewer URL in a browser
  • Why exploitation is possible: User-controlled URL data is reflected into the response without context-appropriate output encoding

Why this happens

The underlying bug is improper neutralization of user-controlled input in web output, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The endpoint treats a URL parameter as displayable content without reliably encoding it for the HTML or script context in which it is inserted, allowing browser-interpreted markup or script data to be returned to users.

Potential impact

  • Malicious script may execute in a victim's browser
  • Session information or page data could be exposed
  • User actions may be performed in the victim's authenticated context
  • Phishing content or deceptive interface elements could be displayed
  • The affected application context could be used to deliver further client-side attacks

General mitigation guidance

Mitigation generally focuses on ensuring that untrusted URL parameters cannot be interpreted as executable browser content.

Common defensive patterns include:

  • Applying context-appropriate output encoding at every rendering sink
  • Validating parameters against narrowly defined formats and allowed values
  • Preferably rendering user-controlled values as text rather than HTML or script content
  • Using framework templating features that escape output by default
  • Applying restrictive Content Security Policy controls as defense in depth
  • Limiting session and application privileges so client-side compromise has less reach

How teams detect issues like this

Organizations commonly identify reflected cross-site scripting through:

  • Static analysis rules for unescaped request parameters reaching HTML, JavaScript, or DOM sinks
  • Code review checks for direct concatenation of URL data into responses
  • Dynamic testing that verifies special characters are encoded in their output context
  • Web application firewall or gateway policies for suspicious reflected input patterns
  • Regression tests covering every externally supplied parameter rendered by the bill viewer

Automated security review tools may help identify data flows from request parameters to browser-interpreted output.

Sources

SourceLink
tm4web.comtm4web.com
trimble.comtrimble.com
github.comgithub.com/PN-Tester/CVE-2022-35499

Frequently asked

questions

It may be exploitable remotely when the bill viewer endpoint is reachable and a victim can be persuaded to open a crafted URL.

Not necessarily. The key requirements are access to the endpoint and a victim browser that requests the affected URL; authentication requirements depend on the deployment configuration.

Treat all URL parameters as untrusted and apply context-appropriate output encoding before placing them in the response, while using strict allowlist validation where practical.

Use auto-escaping templates, review request-to-response data flows, test browser output handling, and enforce secure coding checks for untrusted data reaching HTML or script contexts.

Find out what's already
exploitable in your codebase.