The present patent application relates to a cosmetic or dermatological composition comprising, in a cosmetically or dermatologically acceptable medium, a polymer comprising: (a) a polymer backbone that may be obtained by reaction: of a polyol comprising 3 to 6 hydroxyl groups; of a monocarboxylic acid containing 6 to 32 carbon atoms; of a polycarboxylic acid comprising at least two carboxylic groups COOH, and/or of a cyclic anhydride such as a polycarboxylic acid and/or of a lactone comprising at least one carboxylic group COOH; and (b) at least one junction group linked to the said polymer backbone and capable of establishing H bonds with one or more partner junction groups, each pairing of a junction group involving at least three H (hydrogen) bonds. The patent application also concerns a cosmetic treatment process using the said composition.