The corrosion behavior of silicon nitride materials in aqueous media strongly depends on the composition and amount of the grain boundary. But there exist no systematic investigations of the relation between the corrosion behavior and the composition and amount of the grain-boundary phase. The subject of this study is based on the evaluation of the corrosion mechanisms of Si3N4 ceramics and YSiAlON glasses, both with defined and characterized compositions, in acidic and basic environments with different concentrations. Special effort has been made in describing the compositions of grain boundary phases in the sintered Si3N4 ceramics. A model to describe structural features of YSiAlON-glasses was developed which allows the correlation of the corrosion behavior of the ceramics and the glasses with their compositions. In combination with SEM and TEM investigations it became possible to give structural reasons for the different observed corrosion mechanisms.