/

CVE-2026-39379

Severity:

HIGH RISK

(7.1)

AngularJS Template Injection (CWE-1336) in GeoNetwork

CVE-2026-39379

Received

Vulnerability type

Category:

Client-Side Template Injection

CWE:

CWE-79, CWE-1336

Impact:

Reflected Cross-Site Scripting (XSS)

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

GeoNetwork error pages can reflect attacker-controlled request content into an AngularJS application without adequately preventing template evaluation. If a victim opens a crafted link that triggers the affected error page, the reflected content may execute JavaScript in the victim's authenticated browser session.

GeoNetwork error pages can reflect attacker-controlled request content into an AngularJS application without adequately preventing template evaluation. If a victim opens a crafted link that triggers the affected error page, the reflected content may execute JavaScript in the victim's authenticated browser session.

Affected context

The issue occurs in GeoNetwork error handling for requests to nonexistent or unauthorized service URLs. It becomes risky when request content is inserted into an AngularJS page where it can be interpreted as a template expression rather than rendered as inert text. The described affected release lines are fixed in versions 4.2.15 and 4.4.10.

The issue occurs in GeoNetwork error handling for requests to nonexistent or unauthorized service URLs. It becomes risky when request content is inserted into an AngularJS page where it can be interpreted as a template expression rather than rendered as inert text. The described affected release lines are fixed in versions 4.2.15 and 4.4.10.

Exploit preconditions

  • Attack surface: GeoNetwork pages that handle nonexistent or unauthorized service URLs
  • Required access: An attacker can send a crafted link to a victim; the victim must open it. The attacker does not necessarily need an account, though deployment access controls may affect reachability.
  • Trigger point: The victim's browser renders the error page produced by the crafted request.
  • Why exploitation is possible: Attacker-controlled content is reflected into an AngularJS context without adequate neutralization, allowing template evaluation. Known AngularJS sandbox-escape techniques may then enable JavaScript execution.
  • Attack surface: GeoNetwork pages that handle nonexistent or unauthorized service URLs
  • Required access: An attacker can send a crafted link to a victim; the victim must open it. The attacker does not necessarily need an account, though deployment access controls may affect reachability.
  • Trigger point: The victim's browser renders the error page produced by the crafted request.
  • Why exploitation is possible: Attacker-controlled content is reflected into an AngularJS context without adequate neutralization, allowing template evaluation. Known AngularJS sandbox-escape techniques may then enable JavaScript execution.

Why this happens

The application treats request-derived content as safe for insertion into an AngularJS page, where it can be evaluated as a template expression. This is a client-side template injection pattern associated with CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine. Because the evaluated content can execute script in the victim's browser, the issue also relates to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

The application treats request-derived content as safe for insertion into an AngularJS page, where it can be evaluated as a template expression. This is a client-side template injection pattern associated with CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine. Because the evaluated content can execute script in the victim's browser, the issue also relates to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Potential impact

  • JavaScript may execute in a victim's authenticated browser session.
  • An attacker could disclose information accessible to the victim.
  • Actions could be performed with the victim's application privileges.
  • Administrator sessions may be at risk if administrators open crafted links.
  • JavaScript may execute in a victim's authenticated browser session.
  • An attacker could disclose information accessible to the victim.
  • Actions could be performed with the victim's application privileges.
  • Administrator sessions may be at risk if administrators open crafted links.

General mitigation guidance

Common defensive patterns focus on keeping untrusted request data out of executable template contexts:

  • Render request-derived values as inert text using context-appropriate output encoding.
  • Avoid compiling or evaluating templates that contain user-controlled content; use fixed templates with safely bound data instead.
  • Reduce trust in URL and request parameters, and validate data against expected formats before use.
  • Apply restrictive browser policies, such as a carefully configured Content Security Policy, as defense in depth rather than as a substitute for safe rendering.
  • Limit application privileges so a compromised browser session has less authority.

Common defensive patterns focus on keeping untrusted request data out of executable template contexts:

  • Render request-derived values as inert text using context-appropriate output encoding.
  • Avoid compiling or evaluating templates that contain user-controlled content; use fixed templates with safely bound data instead.
  • Reduce trust in URL and request parameters, and validate data against expected formats before use.
  • Apply restrictive browser policies, such as a carefully configured Content Security Policy, as defense in depth rather than as a substitute for safe rendering.
  • Limit application privileges so a compromised browser session has less authority.

How teams detect issues like this

  • Use static analysis to identify request-derived data flowing into AngularJS template compilation, HTML rendering, or other evaluation-sensitive sinks.
  • Review error-page templates and client-side bindings for dynamic template construction and missing context-aware encoding.
  • Test error handling for reflected request content and verify that it is rendered as inert text.
  • Enforce code-review or CI policies that prohibit compiling templates from untrusted data and require safe output handling.
  • Automated security review tools may help identify risky source-to-sink flows.
  • Use static analysis to identify request-derived data flowing into AngularJS template compilation, HTML rendering, or other evaluation-sensitive sinks.
  • Review error-page templates and client-side bindings for dynamic template construction and missing context-aware encoding.
  • Test error handling for reflected request content and verify that it is rendered as inert text.
  • Enforce code-review or CI policies that prohibit compiling templates from untrusted data and require safe output handling.
  • Automated security review tools may help identify risky source-to-sink flows.

Sources

SourceLink
github.comgithub.com/geonetwork/core-geonetwork/commit/5cacdfaa6db88ef6787495b496a0871c0058b7f4
github.comgithub.com/geonetwork/core-geonetwork/commit/dd99c2ffb642f89b8bf72bafd04d824c9fc0d0ef
github.comgithub.com/geonetwork/core-geonetwork/releases/tag/4.2.15
github.comgithub.com/geonetwork/core-geonetwork/releases/tag/4.4.10
github.comgithub.com/geonetwork/core-geonetwork/security/advisories/GHSA-2v4m-fw6c-g78f

Frequently asked

questions

A remote attacker may be able to deliver a crafted link, but exploitation depends on a victim opening it and reaching the affected error page.

Not necessarily. The key prerequisite is getting a victim to load a crafted request; deployment access controls may affect which URLs can be reached.

Keep untrusted data out of template evaluation. Use fixed templates and render request-derived values as inert text with context-appropriate encoding.

Reduce trust in request data, review data flows into template and HTML sinks, and enforce policies against dynamic compilation of untrusted content.

A remote attacker may be able to deliver a crafted link, but exploitation depends on a victim opening it and reaching the affected error page.

Not necessarily. The key prerequisite is getting a victim to load a crafted request; deployment access controls may affect which URLs can be reached.

Keep untrusted data out of template evaluation. Use fixed templates and render request-derived values as inert text with context-appropriate encoding.

Reduce trust in request data, review data flows into template and HTML sinks, and enforce policies against dynamic compilation of untrusted content.

Find out what's already
exploitable in your codebase.