The present invention relates to flavonoids isolated from Euphorbia cuneata, a method for their isolation, extracts from Euphorbia cuneata and a pharmaceutical composition comprising the flavonoids or the extracts or both of them for a use as anti-ulcer agent.