Secure code review

Auditing browser messaging, navigation and remaining client controls

Trusted records: terminal, document, eye arranged to illustrate auditing browser messaging, navigation and remaining client controls.

Frontend controls define how the browser separates origins, interprets content and handles information linked to a signed-in user. Understanding browser messaging and navigation and remaining client controls helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Browser security is influenced by origins, embedded content, messaging and the way returned data is interpreted. A server can make a correct decision while client-side code later exposes the result to an unintended page or execution context.

Why it matters

Consider a realistic failure: a protected page returns private data correctly but exposes it through an unintended rendering, messaging or embedding relationship.

A browser trust failure can affect signed-in users, private responses or actions taken with a user's session. The assessment should identify the relevant browser behaviour and the server-side permissions that remain in force.

A code audit connects a stated requirement to the implementation responsible for enforcing it. Source review and targeted behavioural checks should explain the same boundary and any relevant exceptions.

How penetration testers check for it

Review the specific control expectations below against the code, deployment and observable application behaviour.

  • Confirm that the application only uses client-side technologies which are still supported and considered secure. Examples of technologies which do not meet this requirement include NSAPI plugins, Flash, Shockwave, ActiveX, Silverlight, NACL, or client-side Java applets.
  • Confirm that the application will only automatically redirect the user to a different hostname or domain (which is not controlled by the application) where the destination appears on an allowlist.
  • Confirm that the application shows a notification when the user is being redirected to a URL outside of the application's control, with an option to cancel the navigation.
  • Confirm that the application's top-level domain is added to the public preload list for HTTP Strict Transport Security (HSTS). This ensures that the use of TLS for the application is built directly into the main browsers, rather than relying only on the Strict-Transport-Security response header field.
  • Confirm that the application behaves as documented if the browser used to access the application does not support the expected security features.
  • Trace untrusted data into rendering and navigation.
  • Check credentialed requests and sensitive state changes.

How to fix it

Implement the required boundary in the component that actually performs the sensitive operation and retain focused regression coverage.

  • Keep trusted and untrusted content in appropriate contexts.
  • Use safe rendering and precisely scoped browser policies.
  • Validate messaging origins and intended recipients.
  • Retain independent server-side identity and permission checks.

A policy finding needs application context. The absence of a particular header or browser feature is not, by itself, proof that protected data can be accessed.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss the security of your application code.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo