Headline
CVE-2021-4276: Fix potential sql injection through fs path by japroc · Pull Request #190 · dns-stats/hedgehog
** DISPUTED ** ** UNSUPPPORTED WHEN ASSIGNED **** UNSUPPORTED WHEN ASSIGNED ** ** DISPUTED ** A vulnerability was found in dns-stats hedgehog. It has been rated as problematic. Affected by this issue is the function DSCIOManager::dsc_import_input_from_source of the file src/DSCIOManager.cpp. The manipulation leads to sql injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The real existence of this vulnerability is still doubted at the moment. The name of the patch is 58922c345d3d1fe89bb2020111873a3e07ca93ac. It is recommended to apply a patch to fix this issue. VDB-216746 is the identifier assigned to this vulnerability. NOTE: This vulnerability only affects products that are no longer supported by the maintainer. NOTE: We do assume that the Data Manager server can only be accessed by authorised users. Because of this, we don’t believe this specific attack is possible without such a compromise of the Data Manager server.
Hi there,
Thanks for this report - we appreciate your interest. You’ll have probably noticed that this project is no longer actively maintained (it is superseded by a different DNS-STATS product) but we’ve taken a look at your PR anyway.
The two parameters you identified are generated by reading in directory names on the ‘Data Manager’ server (as described in the User Manual: https://github.com/dns-stats/hedgehog/blob/develop/docs/Hedgehog_User_Guide.pdf). This server is where files from nodes are uploaded to, and so an attacker would need enough access to that server to be able to create a ‘dummy’ directory there in order to compromise those parameters. We don’t provide specific guidance on upload procedures but we do assume that the Data Manager server can only be accessed by authorised users. Because of this, we don’t believe this specific attack is possible without such a compromise of the Data Manager server.
A small aside is that the list of server directories that are processed for data import is limited to those that are already in the database (see https://github.com/dns-stats/hedgehog/blob/develop/tools/refile_and_grok.in#L165), although the list of nodes is not. Servers in the database are restricted to alphanumeric characters and underscores. An additional check could be added in that file to ensure the list of nodes processed is also limited to those already in the database.
However, since your proposed fix is straightforward and harmless, we have accepted it.