A movie about 2 kids looking for pirate treasure, but they found barrels with deadly gas instead

I’m looking for a movie that I’ve watched almost 20 years ago. All I remember: I watched it in early 2000s, don’t know when this movie was made. 2 kids were looking for buried treasure, they had map leading to treasure. At the end of movie those kids found barrels with Zyklon B (gas that was used by Germans in gas chambers), they saw ghost of either pirate or man in SS uniform, the ghost warned kids that the gas is deadly and they shouldn’t open barrels. Kids called for military to help them with barrels. It was adventure movie. Action took place in modern times.

did it seem to be an american film?

It might be, but I'm not 100% sure, I don't remember any of the cast

there are tons of kids treasure movies i am wading through, but none talking of the barrels. it was just 2 kids? was one a girl? so far, "mystic nights and pirate fights" seems closest https://m.imdb.com/title/tt0138640/?ref_=tturv_ov