Year, make, model, please. Master cylinders have an internal piston with two rubber 'cups'. The rear cup (secondary) can leak fluid externally. The forward cup can leak causing an internal 'leak', or allow pressure to bypass, causing a loss of pressure. If the brake fluid hasn't been flushed at the suggested intervals by the manufacturer, they may have a 'case'. Debris can build up in the cylinder and rupture the primary 'cup'. Sitting at a stop, you'll notice the brake pedal beginning to 'fade'. Usually, by pumping the brake pedal, you'll regain a 'good' pedal. It is very rare that the master cylinder would fail 'all of a sudden' without prior warnings.