Electrical device for a secure exchange of electrical power between an electrical power consumer of an electrical circuit of an assembly, in particular of a vehicle, and an electricity source of an electrical network external to said assembly, comprising: - an electrical line connecting the electrical network to said assembly, said line comprising electrical conductors in which a first portion, called power exchange line, is able to be connected to said electrical network so as to allow an exchange of electrical power between the electrical power source of said network and said power consumer; and a second portion, called ground line, is able to make an equipotential connection between the electrical ground of the assembly and the ground of the electrical network; - a first measurement system able to measure a common mode current (i) flowing through one of the two portions (100a, 100b) of the electrical line during an exchange of power between the electricity source and the consumer, said electrical device being characterized by: - at least one impedance connected by one of its terminals to the electrical exchange line of the electrical line or to an internal potential of the electrical circuit, - an electronic component connected on the one hand to said first measurement system for measuring the common mode current, the component being configured to apply, between the ground line and another terminal of the impedance, an electrical quantity allowing, when electrical power is exchanged between the consumer and the electrical power source, the common mode current flowing through the portion of the electrical line, the current of which is measured by the first measurement system, to be decreased, - a second measurement system (102, 103) able to measure a residual current flowing through at least the portion of the electrical line, the current of which is not measured by the first measurement system, and - a control unit configured to detect a fault in the exchange of power when a value obtained on the basis of the current measured by the second measurement system (102, 103) is higher than a threshold value. - an electrical line connecting the electrical network to said assembly, said line comprising electrical conductors in which a first portion, called power exchange line, is able to be connected to said electrical network so as to allow an exchange of electrical power between the electrical power source of said network and said power consumer; and a second portion, called ground line, is able to make an equipotential connection between the electrical ground of the assembly and the ground of the electrical network; - a first measurement system able to measure a common mode current (i) flowing through one of the two portions (100a, 100b) of the electrical line during an exchange of power between the electricity source and the consumer, said electrical device being characterized by: - at least one impedance connected by one of its terminals to the electrical exchange line of the electrical line or to an internal potential of the electrical circuit, - an electronic component connected on the one hand to said first measurement system for measuring the common mode current, the component being configured to apply, between the ground line and another terminal of the impedance, an electrical quantity allowing, when electrical power is exchanged between the consumer and the electrical power source, the common mode current flowing through the portion of the electrical line, the current of which is measured by the first measurement system, to be decreased, - a second measurement system (102, 103) able to measure a residual current flowing through at least the portion of the electrical line, the current of which is not measured by the first measurement system, and - a control unit configured to detect a fault in the exchange of power when a value obtained on the basis of the current measured by the second measurement system (102, 103) is higher than a threshold value. - at least one impedance connected by one of its terminals to the electrical exchange line of the electrical line or to an internal potential of the electrical circuit, - an electronic component connected on the one hand to said first measurement system for measuring the common mode current, the component being configured to apply, between the ground line and another terminal of the impedance, an electrical quantity allowing, when electrical power is exchanged between the consumer and the electrical power source, the common mode current flowing through the portion of the electrical line, the current of which is measured by the first measurement system, to be decreased, - a second measurement system (102, 103) able to measure a residual current flowing through at least the portion of the electrical line, the current of which is not measured by the first measurement system, and - a control unit configured to detect a fault in the exchange of power when a value obtained on the basis of the current measured by the second measurement system (102, 103) is higher than a threshold value.