Abstract We examine interacting bosonic higher-spin gauge fields in the BRST-antifield formalism. Assuming that an interacting action $S$ is a deformation of the free action with a deformation parameter $g$, we solve the master equation $(S,S)=0$ from the lower orders in $g$. It is shown that, choosing a certain cubic interaction as the first-order deformation, we can solve the master equation and obtain an action containing all orders in $g$. The antighost number of the action obtained is less than or equal to two. Furthermore, we show that the action obtained is lifted to that of interacting bosonic higher-spin gauge fields on anti-de Sitter spaces.