An undercut processing mechanism (1, 1A, 2, 3, 4, 5, 6) that is attachable to and usable in a molding die for forming a molded product having an undercut portion, the undercut processing mechanism allowing the undercut portion to be demolded in a Y direction which is a demolding direction, the undercut processing mechanism comprising: a holder (30, 63, 73, 111) attachable to the molding die or formed integrally with the molding die; a sliding piece (53, 64, 110) configured to form a part of a mold core (51, 52, 61, 62, 71, 72) for forming the undercut portion, the sliding piece being configured to be slidable relative to the holder such that the mold core is moved so as to demold the undercut portion; a retaining piece (40, 60, 70, 90) configured to retain the sliding piece such that the sliding piece is slidable; a guiding member (33, 34) provided in the holder and configured to movably guide the mold core; and a support member (43, 67) comprising a portion of the undercut processing mechanism other than the guiding member, the support member being configured to support the sliding piece over the entirety of the opening and closing stroke so as to prevent the sliding piece from being tilted when the sliding piece slides wherein the support member and the guiding member are configured to support the sliding piece so as to prevent the sliding piece from being tilted in any of an X direction in which the mold core moves, the Y direction and a Z direction perpendicular to both of the X direction and the Y direction; and a projection is formed on an upper end surface of the retaining piece so as to extend in the X direction and is configured to allow the mold cores to move along the X direction, and the retaining piece has a support wall that projects from an upper surface of the projection in the Y direction, the support wall being attached to the retaining piece or formed integrally with the retaining piece, the support member comprising the support wall, or the holder comprises the support member, the support member being attached to the holder or being formed integrally with the holder. a holder (30, 63, 73, 111) attachable to the molding die or formed integrally with the molding die; a sliding piece (53, 64, 110) configured to form a part of a mold core (51, 52, 61, 62, 71, 72) for forming the undercut portion, the sliding piece being configured to be slidable relative to the holder such that the mold core is moved so as to demold the undercut portion; a retaining piece (40, 60, 70, 90) configured to retain the sliding piece such that the sliding piece is slidable; a guiding member (33, 34) provided in the holder and configured to movably guide the mold core; and a support member (43, 67) comprising a portion of the undercut processing mechanism other than the guiding member, the support member being configured to support the sliding piece over the entirety of the opening and closing stroke so as to prevent the sliding piece from being tilted when the sliding piece slides wherein the support member and the guiding member are configured to support the sliding piece so as to prevent the sliding piece from being tilted in any of an X direction in which the mold core moves, the Y direction and a Z direction perpendicular to both of the X direction and the Y direction; and a projection is formed on an upper end surface of the retaining piece so as to extend in the X direction and is configured to allow the mold cores to move along the X direction, and the retaining piece has a support wall that projects from an upper surface of the projection in the Y direction, the support wall being attached to the retaining piece or formed integrally with the retaining piece, the support member comprising the support wall, or the holder comprises the support member, the support member being attached to the holder or being formed integrally with the holder.