Magnussen did an insane run on those fresh softs, gaining ~7.4 seconds on Giovinazzi in 3 laps!
I had to check it for bugs, here are the results:
Lap 18:
Magnussen - 1:23.971
Verstappen - 1:25.047
Leclerc - 1:25.090 (before the crash)
Giovinazzi - 1:26.510
It seems very regular to me. Magnussen, while having probably the fastest package on the track, coupled with Bahrain being relatively easy to pass, coupled with everyone else being on slightly worn tyres of the slower compound, while Magnussen had fresh softs, coupled with probably some insane variance, allowed for this masterpiece gaining 7 places in 3 laps.
I will also point out that Magnussen's personal best lap is a 1:23.340, on lap 2. So on lower fuel he should be faster which he is not. So Magnussen, along with Leclerc and Max, are definitely all being affected negatively by the traffic.
My overall conclusion: no bugs