[GODRIVER-1086] Can leak creds through errors from URI Parsing Created: 22/May/19  Updated: 28/Oct/23  Resolved: 24/May/19

Status: Closed
Project: Go Driver
Component/s: Error Handling
Affects Version/s: 1.0.2
Fix Version/s: 1.0.3

Type: Bug Priority: Critical - P2
Reporter: Scott L'Hommedieu (Inactive) Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backported by GODRIVER-1087 Backport "Can leak creds through erro... Closed
Problem/Incident
Related

 Description   

When a URI Parsing error is encountered the return is the URI (conn string) and the parse error. The error contains, in the message, the URI passed to the parse function. Downstream consumers of the driver do not necessarily have that implementation detail and may pass the error on further downstream. Since the URI may contain sensitive information (passwords) these errors may inadvertently leak credentials.

https://github.com/mongodb/mongo-go-driver/blob/c2a43c080082db26ed2d6fb44026ce1d00a983a7/x/mongo/driver/connstring/connstring.go#L29



 Comments   
Comment by Githook User [ 24/May/19 ]

Author:

{'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1086 don't return the uri when parsing fails

Change-Id: Ia7ce0035da57defa49359cb1c134d32507505210
Branch: release/1.0
https://github.com/mongodb/mongo-go-driver/commit/674519381d201b166618c210ab349a4bba9bf8e5

Comment by Githook User [ 24/May/19 ]

Author:

{'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1086 don't return the uri when parsing fails

Change-Id: Ia7ce0035da57defa49359cb1c134d32507505210
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/5f844d7e6745921832a2eb469501e60c342189c0

Comment by Isabella Siu (Inactive) [ 24/May/19 ]

code review url: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/455680

Comment by Ian Whalen (Inactive) [ 23/May/19 ]

audit for any other leaks of the uri string in error messages.

Comment by Jeffrey Yemin [ 23/May/19 ]

Note: because the URI parsing process of a mongodb+srv URI involves looking up a TXT record in DNS, a perfectly fine URI from a syntax perspective can result in an error if the DNS lookup fails.

Generated at Thu Feb 08 08:35:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.