We propose an approximate general method for calculating the effective dielectric function of a random composite in which there is a weakly nonlinear relation between electric displacement and electric field of the form D=E+|E|2E, where and are position dependent. In a two-phase composite, to first order in the nonlinear coefficients 1 and 2, the effective nonlinear dielectric susceptibility is found to be e=i=1,2(ipi)(ei)0|ei|0, where e(0) is the effective dielectric constant in the linear limit (i=0,i=1,2) and i and pi are the dielectric function and volume fraction of the ith component. The approximation is applied to a calculation of e in the Maxwell-Garnett approximation (MGA) and the effective-medium approximation. For low concentrations of nonlinear inclusions in a linear host medium, our MGA reduces to the results of Stroud and Hui. An exact calculation of e is carried out for the Hashin-Shtrikman microgeometry and compared to our MG approximation.