diff --git a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java index 8118760cd1bb2..0bc9a8ea5ebf5 100644 --- a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java +++ b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java @@ -66,6 +66,7 @@ import org.opensearch.transport.TransportService; import org.yaml.snakeyaml.Yaml; import org.opensearch.env.EnvironmentSettingsResponse; +import org.yaml.snakeyaml.constructor.SafeConstructor; /** * The main class for managing Extension communication with the OpenSearch Node. @@ -555,7 +556,7 @@ public String executor() { } private ExtensionsSettings readFromExtensionsYml(Path filePath) throws IOException { - Yaml yaml = new Yaml(); + Yaml yaml = new Yaml(new SafeConstructor()); try (InputStream inputStream = Files.newInputStream(filePath)) { Map obj = yaml.load(inputStream); if (obj == null) {