Packages / @grpc/grpc-js / Security
@grpc/grpc-js: In certain configurations, getAuthContext can return unauthorized certificates as though they were authorized
Affected releases · @grpc/grpc-js
- 1.x1.0.0 – 1.14.4Fixed in 1.14.5
- 0.8.x and older0.1.0 – 0.8.1No fix, no longer updated
On 1.x, the newest line:
npm install @grpc/grpc-js@1.14.5Affected
1.0.0 – 1.13.5
144 releases
Fixed
1.13.6 – 1.13.7
2 releases
Affected
1.14.0 – 1.14.4
5 releases
Fixed
1.14.5 – 1.14.6
2 releases, latest
Affected
0.1.0 – 0.8.1
49 releases
Is your project affected?
Paste your package.json, or type the range you declare for @grpc/grpc-js. It is read in your browser and sent nowhere.
What happens
Impact
When server credentials are created with the requireClientCertificate option set to false, getAuthContext does not distinguish between authorized and unauthorized certificates in its return value. This can create improper authentication vulnerabilities for @grpc/grpc-js users who use the result of getAuthContext for authentication.
In particular, @grpc/grpc-js-xds can both set the requireClientCertificate option to false and use the return value of getAuthContext for RBAC authentication in some configurations.
Patches
This vulenrability is fixed in 1.13.6 and 1.14.5.
Workarounds
@grpc/grpc-js users using getAuthContext this way can avoid this problem by setting requireClientCertificate to true. @grpc/grpc-js-xds users using RBAC can avoid this by setting the require_client_certificate field to true in the DownstreamTlsContext in the xDS configuration.