Counterintuitive, but true: Most almond extract doesn't come from almonds. Most commercial "pure almond extracts" are actually made from the kernels of peach or apricot pits. These kernels have the same flavor compounds as almond oil but they are less expensive to obtain and process. Similar compounds can be derived synthetically in labs or from cassia (a plant with a flavor similar to cinnamon).
Does that mean you can rest easy when you see almond extract on a list of ingredients? Not so fast. The compounds released from peach and apricot pits are bioidentical to those in almonds, and there is little or no information about whether extracts derived from stone fruit pits are safe for a nut-free diet. However, artificial nut extract is considered a safe choice. It has one further virtue: It is almost always less expensive.