Never trust a mastermind
JavaScript (ES6),  116 112  107 bytes
Expects an array of entries in the following format: [[a,b,c,d], &quot;XY&quot;], where a to d are integers in [0..7], X is the number of correct digits and Y is the number of near-misses.
Returns 0 or 1.

f=(a,n)=&gt;n&gt;&gt;12?0:!a.some(([a,x])=&gt;!a.every(o=(d,i)=&gt;o[x-=d^(v=n&gt;&gt;i*3&amp;7)?a.includes(v):10,v]^=1)|x)|f(a,-~n)

Try it online!
Commented
f = (                     // f is a recursive function taking:
  a,                      //   a[] = input
  n                       //   n = 12-bit counter, initially undefined, to
) =&gt;                      //       describe all possible codes
n &gt;&gt; 12 ?                 // if n = 4096:
  0                       //   stop the recursion
:                         // else:
  !a.some(([a, x]) =&gt;     //   for each entry [a, x, y] in a[], with a[] =
                          //   guess, x = correct digits and near-misses:
    !a.every(o =          //     we use the object o to keep track of the
                          //     digits that were already extracted from n,
                          //     in order to discard invalid codes
      (d, i) =&gt;           //     for each value d at position i in a[]:
      o[                  //
        x -=              //       update x:
          d ^ (           //         compare d with ...
            v =           //         ... v which is defined as ...
              n &gt;&gt; i * 3  //         ... the next 3-bit digit extracted from n
              &amp; 7         //
          ) ?             //         if d is not equal to v, decrement x if ...
            a.includes(v) //           ... v appears elsewhere in a[]
          :               //         else:
            10,           //           subtract 10 from x
        v                 //       actual index in o to ...
      ] ^= 1              //       ... mark this digit as used; or yield 0
                          //       and exit every() if it was already used
    )                     //     end of every(); the iteration fails if it's
    | x                   //     falsy or x is not equal to 0
  )                       //   end of some()
  | f(a, -~n)             //   do a recursive call with n + 1