In this paper, we consider the power-allocation problem in orthogonal frequency-division multiplexing (OFDM)-based bidirectional cognitive radio (CR) relay networks. A joint optimization under the amplify-and-forward (AF) relaying protocol is formulated to maximize the throughput of secondary users (SUs) via power loading over different subcarriers at the three (two transceivers and a relay) nodes. For compatibility with practical systems, separate power constraints are considered at each transmitting node. Furthermore, to provide high-level protection to primary users (PUs) in underlay CR transmission, per-subcarrier-based interference constraints are assumed. For tractability of the solution, we adopt a decomposition framework where the joint power optimization (JPO) is split into two subproblems. Later, each subproblem is solved by exploiting the convex optimization techniques. Moreover, a low-complexity suboptimal solution of the joint power allocation at all nodes is also proposed. Simulation results are presented to validate the effectiveness of the proposed schemes.