Germany says ‘acute threat’ of hack averted after detection