cve-2021-21378
Vulnerability from cvelistv5
Published
2021-03-11 02:40
Modified
2024-08-03 18:09
Severity ?
EPSS score ?
Summary
JWT authentication bypass with unknown issuer token
References
Impacted products
Vendor | Product | Version | |
---|---|---|---|
▼ | envoyproxy | envoy |
Version: = 1.17.0 |
|
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-03T18:09:16.066Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/envoyproxy/envoy/pull/15194" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "product": "envoy", "vendor": "envoyproxy", "versions": [ { "status": "affected", "version": "= 1.17.0" } ] } ], "descriptions": [ { "lang": "en", "value": "Envoy is a cloud-native high-performance edge/middle/service proxy. In Envoy version 1.17.0 an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list when Envoy\u0027s JWT Authentication filter is configured with the `allow_missing` requirement under `requires_any` due to a mistake in implementation. Envoy\u0027s JWT Authentication filter can be configured with the `allow_missing` requirement that will be satisfied if JWT is missing (JwtMissed error) and fail if JWT is presented or invalid. Due to a mistake in implementation, a JwtUnknownIssuer error was mistakenly converted to JwtMissed when `requires_any` was configured. So if `allow_missing` was configured under `requires_any`, an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list. Integrity may be impacted depending on configuration if the JWT token is used to protect against writes or modifications. This regression was introduced on 2020/11/12 in PR 13839 which fixed handling `allow_missing` under RequiresAny in a JwtRequirement (see issue 13458). The AnyVerifier aggregates the children verifiers\u0027 results into a final status where JwtMissing is the default error. However, a JwtUnknownIssuer was mistakenly treated the same as a JwtMissing error and the resulting final aggregation was the default JwtMissing. As a result, `allow_missing` would allow a JWT token with an unknown issuer status. This is fixed in version 1.17.1 by PR 15194. The fix works by preferring JwtUnknownIssuer over a JwtMissing error, fixing the accidental conversion and bypass with `allow_missing`. A user could detect whether a bypass occurred if they have Envoy logs enabled with debug verbosity. Users can enable component level debug logs for JWT. The JWT filter logs will indicate that there is a request with a JWT token and a failure that the JWT token is missing." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 8.2, "baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-287", "description": "CWE-287 Improper Authentication", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-303", "description": "CWE-303: Incorrect Implementation of Authentication Algorithm", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2021-03-11T02:40:14", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/envoyproxy/envoy/pull/15194" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a" } ], "source": { "advisory": "GHSA-4996-m8hf-hj27", "discovery": "UNKNOWN" }, "title": "JWT authentication bypass with unknown issuer token", "x_legacyV4Record": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2021-21378", "STATE": "PUBLIC", "TITLE": "JWT authentication bypass with unknown issuer token" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "envoy", "version": { "version_data": [ { "version_value": "= 1.17.0" } ] } } ] }, "vendor_name": "envoyproxy" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "Envoy is a cloud-native high-performance edge/middle/service proxy. In Envoy version 1.17.0 an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list when Envoy\u0027s JWT Authentication filter is configured with the `allow_missing` requirement under `requires_any` due to a mistake in implementation. Envoy\u0027s JWT Authentication filter can be configured with the `allow_missing` requirement that will be satisfied if JWT is missing (JwtMissed error) and fail if JWT is presented or invalid. Due to a mistake in implementation, a JwtUnknownIssuer error was mistakenly converted to JwtMissed when `requires_any` was configured. So if `allow_missing` was configured under `requires_any`, an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list. Integrity may be impacted depending on configuration if the JWT token is used to protect against writes or modifications. This regression was introduced on 2020/11/12 in PR 13839 which fixed handling `allow_missing` under RequiresAny in a JwtRequirement (see issue 13458). The AnyVerifier aggregates the children verifiers\u0027 results into a final status where JwtMissing is the default error. However, a JwtUnknownIssuer was mistakenly treated the same as a JwtMissing error and the resulting final aggregation was the default JwtMissing. As a result, `allow_missing` would allow a JWT token with an unknown issuer status. This is fixed in version 1.17.1 by PR 15194. The fix works by preferring JwtUnknownIssuer over a JwtMissing error, fixing the accidental conversion and bypass with `allow_missing`. A user could detect whether a bypass occurred if they have Envoy logs enabled with debug verbosity. Users can enable component level debug logs for JWT. The JWT filter logs will indicate that there is a request with a JWT token and a failure that the JWT token is missing." } ] }, "impact": { "cvss": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 8.2, "baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N", "version": "3.1" } }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-287 Improper Authentication" } ] }, { "description": [ { "lang": "eng", "value": "CWE-303: Incorrect Implementation of Authentication Algorithm" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27", "refsource": "CONFIRM", "url": "https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27" }, { "name": "https://github.com/envoyproxy/envoy/pull/15194", "refsource": "MISC", "url": "https://github.com/envoyproxy/envoy/pull/15194" }, { "name": "https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a", "refsource": "MISC", "url": "https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a" } ] }, "source": { "advisory": "GHSA-4996-m8hf-hj27", "discovery": "UNKNOWN" } } } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2021-21378", "datePublished": "2021-03-11T02:40:14", "dateReserved": "2020-12-22T00:00:00", "dateUpdated": "2024-08-03T18:09:16.066Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2021-21378\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2021-03-11T03:15:12.163\",\"lastModified\":\"2024-11-21T05:48:14.037\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"Envoy is a cloud-native high-performance edge/middle/service proxy. In Envoy version 1.17.0 an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list when Envoy\u0027s JWT Authentication filter is configured with the `allow_missing` requirement under `requires_any` due to a mistake in implementation. Envoy\u0027s JWT Authentication filter can be configured with the `allow_missing` requirement that will be satisfied if JWT is missing (JwtMissed error) and fail if JWT is presented or invalid. Due to a mistake in implementation, a JwtUnknownIssuer error was mistakenly converted to JwtMissed when `requires_any` was configured. So if `allow_missing` was configured under `requires_any`, an attacker can bypass authentication by presenting a JWT token with an issuer that is not in the provider list. Integrity may be impacted depending on configuration if the JWT token is used to protect against writes or modifications. This regression was introduced on 2020/11/12 in PR 13839 which fixed handling `allow_missing` under RequiresAny in a JwtRequirement (see issue 13458). The AnyVerifier aggregates the children verifiers\u0027 results into a final status where JwtMissing is the default error. However, a JwtUnknownIssuer was mistakenly treated the same as a JwtMissing error and the resulting final aggregation was the default JwtMissing. As a result, `allow_missing` would allow a JWT token with an unknown issuer status. This is fixed in version 1.17.1 by PR 15194. The fix works by preferring JwtUnknownIssuer over a JwtMissing error, fixing the accidental conversion and bypass with `allow_missing`. A user could detect whether a bypass occurred if they have Envoy logs enabled with debug verbosity. Users can enable component level debug logs for JWT. The JWT filter logs will indicate that there is a request with a JWT token and a failure that the JWT token is missing.\"},{\"lang\":\"es\",\"value\":\"Envoy es un proxy edge/middle/service de servicio de alto rendimiento nativo de la nube.\u0026#xa0;En versi\u00f3n 1.17.0 de Envoy, un atacante puede omitir la autenticaci\u00f3n presentando un token JWT con un emisor que no est\u00e1 en la lista de proveedores cuando el filtro de autenticaci\u00f3n JWT de Envoy est\u00e1 configurado con el requisito \\\"allow_missing\\\" en \\\"require_any\\\" debido a un error en la implementaci\u00f3n.\u0026#xa0;El filtro de autenticaci\u00f3n JWT de Envoy puede ser configurado con el requisito \\\"allow_missing\\\" que se cumplir\u00e1 si falta JWT (error JwtMissed) y presentar\u00e1 un fallo si JWT existe o no es v\u00e1lido.\u0026#xa0;Debido a un error en la implementaci\u00f3n, un error de JwtUnknownIssuer se convirti\u00f3 por error a JwtMissed cuando se configur\u00f3 \\\"require_any\\\".\u0026#xa0;Entonces, si se configur\u00f3 \\\"allow_missing\\\" en \\\"require_any\\\", un atacante puede omitir la autenticaci\u00f3n al presentar un token JWT con un emisor que no est\u00e1 en la lista de proveedores.\u0026#xa0;La integridad puede ser impactada seg\u00fan la configuraci\u00f3n si el token JWT se usa para proteger contra escrituras o modificaciones.\u0026#xa0;Esta regresi\u00f3n fue introducida el 12/11/2020 en PR 13839, que corrigi\u00f3 el manejo de \\\"allow_missing\\\" en RequireAny en un JwtRequirement (consulte el problema 13458).\u0026#xa0;AnyVerifier agrega los resultados de los comprobadores secundarios a un estado final donde JwtMissing es el error predeterminado.\u0026#xa0;Sin embargo, un JwtUnknownIssuer se trat\u00f3 por error igual que un error JwtMissing y la agregaci\u00f3n final resultante fue el JwtMissing predeterminado.\u0026#xa0;Como resultado, \\\"allow_missing\\\" permitir\u00eda un token JWT con un estado de emisor desconocido.\u0026#xa0;Esto es corregido en versi\u00f3n 1.17.1 por PR 15194. La correcci\u00f3n funciona al preferir JwtUnknownIssuer sobre un error de JwtMissing, corrigiendo la conversi\u00f3n accidental y omitiendo con \\\"allow_missing\\\".\u0026#xa0;Un usuario podr\u00eda detectar si se produjo una omisi\u00f3n si posee los registros de Envoy habilitados con verbosidad de depuraci\u00f3n\u0026#xa0;Los usuarios pueden habilitar registros de depuraci\u00f3n a nivel de componente para JWT.\u0026#xa0;Los registros del filtro JWT indicar\u00e1n que se presenta una petici\u00f3n con un token JWT y un fallo de que falta el token JWT\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N\",\"baseScore\":8.2,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":3.9,\"impactScore\":4.2},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N\",\"baseScore\":8.2,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":3.9,\"impactScore\":4.2}],\"cvssMetricV2\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"2.0\",\"vectorString\":\"AV:N/AC:L/Au:N/C:P/I:P/A:N\",\"baseScore\":6.4,\"accessVector\":\"NETWORK\",\"accessComplexity\":\"LOW\",\"authentication\":\"NONE\",\"confidentialityImpact\":\"PARTIAL\",\"integrityImpact\":\"PARTIAL\",\"availabilityImpact\":\"NONE\"},\"baseSeverity\":\"MEDIUM\",\"exploitabilityScore\":10.0,\"impactScore\":4.9,\"acInsufInfo\":false,\"obtainAllPrivilege\":false,\"obtainUserPrivilege\":false,\"obtainOtherPrivilege\":false,\"userInteractionRequired\":false}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-287\"},{\"lang\":\"en\",\"value\":\"CWE-303\"}]},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-287\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:envoyproxy:envoy:1.17.0:*:*:*:*:*:*:*\",\"matchCriteriaId\":\"E426CE56-9EB3-4641-B9A0-2E418FD3478F\"}]}]}],\"references\":[{\"url\":\"https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Patch\",\"Third Party Advisory\"]},{\"url\":\"https://github.com/envoyproxy/envoy/pull/15194\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Patch\"]},{\"url\":\"https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Mitigation\",\"Third Party Advisory\"]},{\"url\":\"https://github.com/envoyproxy/envoy/commit/ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\",\"Third Party Advisory\"]},{\"url\":\"https://github.com/envoyproxy/envoy/pull/15194\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://github.com/envoyproxy/envoy/security/advisories/GHSA-4996-m8hf-hj27\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Mitigation\",\"Third Party Advisory\"]}]}}" } }
Loading…
Loading…
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.