Перенаправление подключения драйвера MongoDB Node.js через поддельное имя хоста SRV
MongoDB Node.js Driver
Кратко
Драйвер MongoDB для Node.js может быть обманут и подключён к хосту за пределами ожидаемого домена при использовании строки подключения mongodb+srv://. Злоумышленник, способный подделать или изменить ответ DNS SRV, может сделать это удалённо, без аутентификации, и перенаправить подключение на контролируемый им хост, что может привести к раскрытию данных приложения и учётных данных, а также к изменению результатов запросов.
Резюме сгенерировано ИИ по данным источников и переведено автоматически.
Исправление
Исправлено в версиях: 7.8.0
Затронутые версии
| Node.js Driver | с 3.3.3 → исправлено в 7.8.0 |
Оригинальное описание (EN)
Оригинальный заголовок: MongoDB Node.js Driver connection redirect via crafted SRV hostname
A validation flaw in the DNS SRV host discovery of the MongoDB Node.js driver may cause the driver to connect to a host outside the expected domain. For a mongodb+srv:// connection string, the driver checks each host name in the DNS SRV response against the domain of the connection string. The driver then builds the connection address from the original name, in which certain characters end the host name early. An unauthenticated party who can forge or change the DNS SRV response may redirect the connection to a host of their choice. TLS does not prevent this, because the driver verifies the server certificate against the redirected host name. This may result in unintended disclosure of application data and authentication credentials, and in altered query results. Applications that use mongodb:// connection strings are not affected.