ghsa-mf24-chxh-hmvj
Vulnerability from github
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" 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
References
Are there any links users can visit to find out more?
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/envoyproxy/gateway" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.2.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/envoyproxy/gateway" }, "ranges": [ { "events": [ { "introduced": "1.3.0-rc.1" }, { "fixed": "1.3.1" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-25294" ], "database_specific": { "cwe_ids": [ "CWE-117" ], "github_reviewed": true, "github_reviewed_at": "2025-03-06T19:11:39Z", "nvd_published_at": "2025-03-06T19:15:27Z", "severity": "MODERATE" }, "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: \u0027%START_TIME%\u0027\n method: \u0027%REQ(:METHOD)%\u0027\n x-envoy-origin-path: \u0027%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%\u0027\n protocol: \u0027%PROTOCOL%\u0027\n response_code: \u0027%RESPONSE_CODE%\u0027\n response_flags: \u0027%RESPONSE_FLAGS%\u0027\n response_code_details: \u0027%RESPONSE_CODE_DETAILS%\u0027\n connection_termination_details: \u0027%CONNECTION_TERMINATION_DETAILS%\u0027\n upstream_transport_failure_reason: \u0027%UPSTREAM_TRANSPORT_FAILURE_REASON%\u0027\n bytes_received: \u0027%BYTES_RECEIVED%\u0027\n bytes_sent: \u0027%BYTES_SENT%\u0027\n duration: \u0027%DURATION%\u0027\n x-envoy-upstream-service-time: \u0027%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%\u0027\n x-forwarded-for: \u0027%REQ(X-FORWARDED-FOR)%\u0027\n user-agent: \u0027%REQ(USER-AGENT)%\u0027\n x-request-id: \u0027%REQ(X-REQUEST-ID)%\u0027\n :authority: \u0027%REQ(:AUTHORITY)%\u0027\n upstream_host: \u0027%UPSTREAM_HOST%\u0027\n upstream_cluster: \u0027%UPSTREAM_CLUSTER%\u0027\n upstream_local_address: \u0027%UPSTREAM_LOCAL_ADDRESS%\u0027\n downstream_local_address: \u0027%DOWNSTREAM_LOCAL_ADDRESS%\u0027\n downstream_remote_address: \u0027%DOWNSTREAM_REMOTE_ADDRESS%\u0027\n requested_server_name: \u0027%REQUESTED_SERVER_NAME%\u0027\n route_name: \u0027%ROUTE_NAME%\u0027\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?_", "id": "GHSA-mf24-chxh-hmvj", "modified": "2025-03-11T17:15:37Z", "published": "2025-03-06T19:11:39Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "type": "CVSS_V3" } ], "summary": "Envoy Gateway Log Injection Vulnerability" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.