VYPR
Unrated severityNVD Advisory· Published Nov 17, 2010· Updated Apr 29, 2026

CVE-2010-4159

CVE-2010-4159

Description

Untrusted search path vulnerability in metadata/loader.c in Mono 2.8 and earlier allows local users to gain privileges via a Trojan horse shared library in the current working directory.

Affected products

66
  • Mono/Mono66 versions
    cpe:2.3:a:mono:mono:1.2.2.1:*:*:*:*:*:*:*+ 65 more
    • cpe:2.3:a:mono:mono:1.2.2.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.3.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.5:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.5.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.5.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.6:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.9:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.9.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.0:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4.2.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4.2.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4.2.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.4.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.6:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.6.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:2.6.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:*:*:*:*:*:*:*:*range: <=2.6.7
    • cpe:2.3:a:mono:mono:1.0:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.0.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.0.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.0.5:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.0.6:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.5:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.6:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.7:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.8:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.8.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.8.3:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.9:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.9.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.9.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.10:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.10.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.11:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.12:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.12.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.4:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.5:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.6:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.7:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.8:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.13.8.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.14:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.15:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.16:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.16.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.17:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.17.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.17.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.1.18:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.1:*:*:*:*:*:*:*
    • cpe:2.3:a:mono:mono:1.2.2:*:*:*:*:*:*:*

Patches

1
8e890a3bf80a

Search for dllimported shared libs in the base directory, not cwd.

https://github.com/mono/monoPaolo MolaroOct 12, 2010via nvd-ref
1 file changed · +10 8
  • mono/metadata/loader.c+10 8 modified
    @@ -1340,32 +1340,34 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
     
     		if (!module) {
     			void *iter = NULL;
    -			while ((full_name = mono_dl_build_path (NULL, file_name, &iter))) {
    +			char *mdirname = g_path_get_dirname (image->name);
    +			while ((full_name = mono_dl_build_path (mdirname, file_name, &iter))) {
     				mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
    -						"DllImport loading location: '%s'.", full_name);
    +					"DllImport loading library: '%s'.", full_name);
     				module = cached_module_load (full_name, MONO_DL_LAZY, &error_msg);
     				if (!module) {
     					mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
    -							"DllImport error loading library: '%s'.",
    -							error_msg);
    +						"DllImport error loading library '%s'.",
    +						error_msg);
     					g_free (error_msg);
     				}
     				g_free (full_name);
     				if (module)
     					break;
     			}
    +			g_free (mdirname);
     		}
     
     		if (!module) {
     			void *iter = NULL;
    -			while ((full_name = mono_dl_build_path (".", file_name, &iter))) {
    +			while ((full_name = mono_dl_build_path (NULL, file_name, &iter))) {
     				mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
    -					"DllImport loading library: '%s'.", full_name);
    +						"DllImport loading location: '%s'.", full_name);
     				module = cached_module_load (full_name, MONO_DL_LAZY, &error_msg);
     				if (!module) {
     					mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
    -						"DllImport error loading library '%s'.",
    -						error_msg);
    +							"DllImport error loading library: '%s'.",
    +							error_msg);
     					g_free (error_msg);
     				}
     				g_free (full_name);
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

11

News mentions

0

No linked articles in our index yet.