CVE-2025-25294: Github.com/envoyproxy/gateway Envoy Gateway Log Injection Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-mf24-chxh-hmvj
CVSS 5.3
CWE-117
Published
Advisory Summary

CVE-2025-25294 is a MODERATE (CVSS 5.3) envoy gateway log injection vulnerability vulnerability (CWE-117: Improper Output Neutralization for Logs) affecting Github.com/envoyproxy/gateway libraries in the Go ecosystem. The issue involves envoy gateway log injection vulnerability. Remediation is available by upgrading affected packages to version 1.2.7, 1.3.1.

CVE-2025-25294 at a Glance

CVE Identifier CVE-2025-25294
GHSA Identifier GHSA-mf24-chxh-hmvj
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-117: Improper Output Neutralization for Logs
Affected Product Github.com/envoyproxy/gateway
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-25294

To remediate this vulnerability, upgrade all affected Github.com/envoyproxy/gateway dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/envoyproxy/gateway fixed: 1.2.7
Upgrade github.com/envoyproxy/gateway to 1.2.7
github.com/envoyproxy/gateway fixed: 1.3.1
Upgrade github.com/envoyproxy/gateway to 1.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/envoyproxy/gateway

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-25294, inspect your project dependencies for Github.com/envoyproxy/gateway:

inspect dependencies for github.com/envoyproxy/gateway

Analyze the terminal output to locate any version of Github.com/envoyproxy/gateway in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-117: Improper Output Neutralization for Logs, where the product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file. In Github.com/envoyproxy/gateway, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact In all Envoy Gateway versions prior to 1.2.7 and 1.3.1 a default Envoy Proxy access log configuration is used. This format is vulnerable to log injection attacks. If the attacker uses a specially crafted user-agent which performs json injection, then he could add and overwrite fields to the access log. Examples of attacks include: - Using following string as user agent : `HELLO-WORLD", "evil-ip": "1.1.1.1", "x-forwarded-for": "1.1.1.1` would lead to setting of new access log properties and overwrite of existing properties. Existing properties such as the value of the X-Forwarded-For header may have importance for security analysis of access logs, and their overwrite can be used to hide malicious activity. - Using the following string as user-agent : `"` which renders an invalid json document. The invalid document may fail to be processed by observability solutions, which would allow attacker to hide malicious activity. ### Patches 1.3.1, 1.2.7 ### Fix Using JSON format as the default format for access logs. The logged document will contain the same key and values as before. Only the order of properties is different inside the logged document. ### Workaround One can overwrite the old text based default format with JSON formatter by setting the following property: "EnvoyProxy.spec.telemetry.[accessLog](https://gateway.envoyproxy.io/v1.3/api/extension_types/#proxyaccesslog)" to ``` settings: - format: type: JSON json: start_time: '%START_TIME%' method: '%REQ(:METHOD)%' x-envoy-origin-path: '%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%' protocol: '%PROTOCOL%' response_code: '%RESPONSE_CODE%' response_flags: '%RESPONSE_FLAGS%' response_code_details: '%RESPONSE_CODE_DETAILS%' connection_termination_details: '%CONNECTION_TERMINATION_DETAILS%' upstream_transport_failure_reason: '%UPSTREAM_TRANSPORT_FAILURE_REASON%' bytes_received: '%BYTES_RECEIVED%' bytes_sent: '%BYTES_SENT%' duration: '%DURATION%' x-envoy-upstream-service-time: '%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%' x-forwarded-for: '%REQ(X-FORWARDED-FOR)%' user-agent: '%REQ(USER-AGENT)%' x-request-id: '%REQ(X-REQUEST-ID)%' :authority: '%REQ(:AUTHORITY)%' upstream_host: '%UPSTREAM_HOST%' upstream_cluster: '%UPSTREAM_CLUSTER%' upstream_local_address: '%UPSTREAM_LOCAL_ADDRESS%' downstream_local_address: '%DOWNSTREAM_LOCAL_ADDRESS%' downstream_remote_address: '%DOWNSTREAM_REMOTE_ADDRESS%' requested_server_name: '%REQUESTED_SERVER_NAME%' route_name: '%ROUTE_NAME%' ``` see API definition [here](https://gateway.envoyproxy.io/v1.3/api/extension_types/#proxyaccesslogformat) ### References _Are there any links users can visit to find out more?_

CVE-2025-25294 Affected Github.com/envoyproxy/gateway Versions

2 component(s)
Fixed Versions:
1.2.71.3.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/envoyproxy/gateway
Go
< 1.2.7
1.2.7
github.com/envoyproxy/gateway
Go
≥ 1.3.0-rc.1
< 1.3.1
1.3.1

References

Frequently Asked Questions

What is CVE-2025-25294?
CVE-2025-25294 is a security vulnerability in Github.com/envoyproxy/gateway involving Envoy Gateway Log Injection Vulnerability under CWE-117: Improper Output Neutralization for Logs.
Which Github.com/envoyproxy/gateway versions are affected?
Affected versions include releases prior to 1.2.7, 1.3.1 across affected packages: github.com/envoyproxy/gateway.
What version fixes CVE-2025-25294?
Upgrading to 1.2.7, 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/envoyproxy/gateway affected?
Yes, github.com/envoyproxy/gateway is affected in releases prior to 1.2.7, 1.3.1. Upgrade your dependency to 1.2.7, 1.3.1 or later.
What is the CVSS score of CVE-2025-25294?
CVE-2025-25294 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2025-25294?
CVE-2025-25294 is classified under CWE-117: Improper Output Neutralization for Logs (The product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file.).
How can I check Go dependencies for CVE-2025-25294?
Run the dependency tree command: 'inspect dependencies for github.com/envoyproxy/gateway'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mf24-chxh-hmvj",
  "modified" : "2025-03-11T17:15:37Z",
  "published" : "2025-03-06T19:11:39Z",
  "aliases" : [ "CVE-2025-25294" ],
  "summary" : "Envoy Gateway Log Injection Vulnerability",
  "details" : "### Impact\nIn all Envoy Gateway versions prior to 1.2.7 and 1.3.1 a default Envoy Proxy access log configuration is used. This format is vulnerable to log injection attacks. \n\nIf the attacker uses a specially crafted user-agent which performs json injection, then he could add and overwrite fields to the access log. \n\nExamples of attacks include:\n\n-  Using following string as user agent : `HELLO-WORLD\", \"evil-ip\": \"1.1.1.1\", \"x-forwarded-for\": \"1.1.1.1` would lead to setting of new access log properties and overwrite of existing properties. Existing properties such as the value of the X-Forwarded-For header may have importance for security analysis of access logs, and their overwrite can be used to hide malicious activity. \n\n- Using the following string as user-agent : `\"` which renders an invalid json document. The invalid document may fail to be processed by observability solutions, which would allow attacker to hide malicious activity.  \n\n### Patches\n1.3.1, 1.2.7\n\n### Fix\nUsing JSON format as the default format for access logs. The logged document will contain the same key and values as before. Only the order of properties is different inside the logged document.\n\n### Workaround\nOne can overwrite the old text based default format with JSON formatter by setting the following property: \n\"EnvoyProxy.spec.telemetry.[accessLog](https://gateway.envoyproxy.io/v1.3/api/extension_types/#proxyaccesslog)\" to \n\n```\nsettings:\n- format:\n    type: JSON\n    json:\n      start_time: '%START_TIME%'\n      method: '%REQ(:METHOD)%'\n      x-envoy-origin-path: '%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%'\n      protocol: '%PROTOCOL%'\n      response_code: '%RESPONSE_CODE%'\n      response_flags: '%RESPONSE_FLAGS%'\n      response_code_details: '%RESPONSE_CODE_DETAILS%'\n      connection_termination_details: '%CONNECTION_TERMINATION_DETAILS%'\n      upstream_transport_failure_reason: '%UPSTREAM_TRANSPORT_FAILURE_REASON%'\n      bytes_received: '%BYTES_RECEIVED%'\n      bytes_sent: '%BYTES_SENT%'\n      duration: '%DURATION%'\n      x-envoy-upstream-service-time: '%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%'\n      x-forwarded-for: '%REQ(X-FORWARDED-FOR)%'\n      user-agent: '%REQ(USER-AGENT)%'\n      x-request-id: '%REQ(X-REQUEST-ID)%'\n      :authority: '%REQ(:AUTHORITY)%'\n      upstream_host: '%UPSTREAM_HOST%'\n      upstream_cluster: '%UPSTREAM_CLUSTER%'\n      upstream_local_address: '%UPSTREAM_LOCAL_ADDRESS%'\n      downstream_local_address: '%DOWNSTREAM_LOCAL_ADDRESS%'\n      downstream_remote_address: '%DOWNSTREAM_REMOTE_ADDRESS%'\n      requested_server_name: '%REQUESTED_SERVER_NAME%'\n      route_name: '%ROUTE_NAME%'\n```\nsee API definition [here](https://gateway.envoyproxy.io/v1.3/api/extension_types/#proxyaccesslogformat)\n\n### References\n_Are there any links users can visit to find out more?_",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/envoyproxy/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/envoyproxy/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0-rc.1"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/security/advisories/GHSA-mf24-chxh-hmvj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-25294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/commit/041d474a70d5921e5d65e6e14ea60e14dac70b01"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/commit/358bed50dcb7b32f39a2edb252fb1399c7fc65dc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/commit/8f48f5199cf1bbb9a8ac0695c5171bfef6c9198a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/envoyproxy/gateway"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/releases/tag/v1.2.7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/envoyproxy/gateway/releases/tag/v1.3.1"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3504"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-117" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-06T19:11:39Z",
    "nvd_published_at" : "2025-03-06T19:15:27Z"
  }
}