| Package | Affected versions | Patched versions |
|---|---|---|
| de.tum.in.ase:artemis-java-test-sandbox | < 1.11.2 | 1.11.2 |
| artemis java test sandbox | < 1.11.2 | 1.11.2 |
Because of the missing checkLink(String) override in the SecurityManager, students can load libraries and execute arbitrary code.
Using System.load(String) or System.loadLibrary(String) students can load and execute arbitrary code.
private static native void start(List<String> args);
public static void main(String[] args) {
System.load(new File("path_to_lib.so").getAbsolutePath());
start(List.of(args));
}
Adding this to the security manager (and a translation) should fix the issue:
@Override
public void checkExec(String cmd) {
try {
if (enterPublicInterface())
return;
throw new SecurityException(localized("security.error_link")); //$NON-NLS-1$
} finally {
exitPublicInterface();
}
}
See details.
Arbitrary code execution.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free