To deal with the problem of penetration trajectory planning for UAV security issues, an improved bidirectional quintuple tree node expansion algorithm is proposed. Compare to traditional quintuple tree node expansion algorithm, the proposed algorithm could reduce the number of the expanded tree node, and it makes the bidirectional quintuple tree node expansion algorithm more efficient in path planning. By combining the bidirectional quintuple tree node expansion algorithm with multi-step optimization search mechanism, a kind of real-time UAV path planning algorithm is presented.