You are describing the phenomenon of sensitization of the stainless steel which leads eventually to intergranular corrosion. For a steel alloy to become a stainless steel, the steel alloy should have at least 12% Cr. The 12% of Cr is an essential percentage for the stainless steel alloy to attain passivity against a chemical attack, i.e., corrosion, in the surrounding environment. Therefore, if the stainless steel is reheated, between 950 to 1450 0C, for some reasons, i.e., annealing, welding , and so on, and the 12% Cr has been depleted ,as a chromium carbide, from the grain boundaries of the stainless steel to adjacent areas of grain boundaries. Consequently, the grain boundaries become more susceptible to corrosion than the adjacent areas of grain boundaries, in the surrounding environment. One can think of the above as a Galvanic coupling corrosion occurs between the grain boundaries ,depleted of chromium carbide, of the stainless steel and adjacent areas , rich in chromium carbide, of grain boundaries.
This is a known phenomenon in welded stainless steel. Usually carbon is bonded to different steels' stabilizers such as Ti or Nb. However, when sufficient heating appear, such as in the case of welding, chromium carbides can be formed, leading to depletted zones of chromium, especially near the fusion line. This event may caused intergranular corrosion. Cr is responsible for the passivation layer (stainless) of the steel.
For preventing the corossion product, a heating treatment needs to perform usually to about 1065oC.
You are describing the phenomenon of sensitization of the stainless steel which leads eventually to intergranular corrosion. For a steel alloy to become a stainless steel, the steel alloy should have at least 12% Cr. The 12% of Cr is an essential percentage for the stainless steel alloy to attain passivity against a chemical attack, i.e., corrosion, in the surrounding environment. Therefore, if the stainless steel is reheated, between 950 to 1450 0C, for some reasons, i.e., annealing, welding , and so on, and the 12% Cr has been depleted ,as a chromium carbide, from the grain boundaries of the stainless steel to adjacent areas of grain boundaries. Consequently, the grain boundaries become more susceptible to corrosion than the adjacent areas of grain boundaries, in the surrounding environment. One can think of the above as a Galvanic coupling corrosion occurs between the grain boundaries ,depleted of chromium carbide, of the stainless steel and adjacent areas , rich in chromium carbide, of grain boundaries.